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

Now that we have everything in place, let’s begin adding blocks to the blockchain.



Complete the function add_block().

To do this, create a variable named new_block that takes in a transaction and the previous_block‘s hash. Append new_block to the end of the chain.

Folder Icon

Sign up to start coding

Already have an account?