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.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?