Skip to Content
Build your own Mini-Blockchain!
Adding Blocks to the Chain Securely

Now that we have implemented our Proof-of-Work method, we can now work on adding new blocks securely.



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.

Folder Icon

Sign up to start coding

Already have an account?