Skip to content
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

Error TypeError: new_block() #27

Closed
devjunhong opened this issue Oct 26, 2017 · 3 comments
Closed

Error TypeError: new_block() #27

devjunhong opened this issue Oct 26, 2017 · 3 comments

Comments

@devjunhong
Copy link

Thank you for the kind article

I enjoyed it and tried to reproduce it and play it

I got this error

I used python==3.6.3, Flask==0.12.2, and requests==2.18.4

File ".\blockchain.py", line 204, in mine
block = blockchain.new_block(proof)
TypeError: new_block() missing 1 required positional argument: 'previous_hash'

@Endogen
Copy link

Endogen commented Oct 27, 2017

There is already a PR for that: #19 It's just that @dvf didn't merge it yet

@devjunhong
Copy link
Author

@Endogen, Yes you're right. The line number 135 issue was already solved by PR #19.

but, I got another error when playing with postman to send Get request to "mine"

so, I add empty list to the "new_block" function.

Thank you for pointing out 👍

@dvf
Copy link
Owner

dvf commented Oct 30, 2017

This is fixed in #35

@dvf dvf closed this as completed Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants