Learn
Now that we have implemented our Proof-of-Work method, we can now work on adding new blocks securely.
Instructions
1.
In the .add_block()
method, calculate the proof_of_work
for the new_block
. Assign the calculated proof_of_work
to a variable named proof
before appending the new_block
to the blockchain.
Return, in order, the calculated proof
and the new_block
itself.
Sign up to start coding
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.