-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
differences in medium post code and github repo #1
Comments
Hi Kirk,
Thank you for your feedback and pointing out the slight code differences
between Medium and GitHub repo. I appreciate you taking the time to reach
out and help me correct it.
I'll make the necessary updates to ensure everything works smoothly.
By the way, I have written two more articles that you may find interesting:
1. Introduction to Database Normalization: A Practical Approach with
Camp Data
***@***.***/introduction-to-database-normalization-a-practical-approach-with-camp-data-890c9fa71ae0?source=your_stories_page------------------------------------->
2. A Deep Dive into Ensemble Classification Methods using the Mnist
Dataset
***@***.***/unleashing-the-power-of-ensemble-methods-a-deep-dive-into-classification-using-the-mnist-dataset-1aeefab4c6a6?source=your_stories_page------------------------------------->
Thanks again for your support!
Best regards,
Nikos
…On Thu, Jul 25, 2024 at 1:57 AM Kirk Gosik ***@***.***> wrote:
Hello,
Thanks for making a nice, easy to follow tutorial! I wanted to let you
know that there are a couple of slight code differences in the Blockchain
object code from the medium article and the github repo. I ran into issues
when trying to copy and paste the code from the article and it didn't run.
After looking at the repo, everything worked!
Namely the object takes a miner_address in the article. Also the chain is
used to create the genesis block instead of using the method and it throws
an error.
In the article:
class Blockchain:
def *init*(self, miner_address):
self.miner_address = miner_address
self.chain = [self.create_block(balances=dict(), previous_hash='0'*64)]
self.difficulty = '00000'
self.transactions = []
self.balances = dict()
self.peer_b = copy.deepcopy(self.chain)
def genesis_block(self):
block = self.create_block(balances=dict(), previous_hash='0'*64)
self.chain.append(block)
—
Reply to this email directly, view it on GitHub
<#1>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASIF6P6E5BZ6BZE745G5VG3ZOAWNZAVCNFSM6AAAAABLNMP6JOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQZDQNRQGE2TOOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Thanks for making a nice, easy to follow tutorial! I wanted to let you know that there are a couple of slight code differences in the Blockchain object code from the medium article and the github repo. I ran into issues when trying to copy and paste the code from the article and it didn't run. After looking at the repo, everything worked!
Namely the object takes a miner_address in the article. Also the chain is used to create the genesis block instead of using the method and it throws an error.
In the article:
class Blockchain:
def init(self, miner_address):
self.miner_address = miner_address
self.chain = [self.create_block(balances=dict(), previous_hash='0'*64)]
self.difficulty = '00000'
self.transactions = []
self.balances = dict()
self.peer_b = copy.deepcopy(self.chain)
def genesis_block(self):
block = self.create_block(balances=dict(), previous_hash='0'*64)
self.chain.append(block)
The text was updated successfully, but these errors were encountered: