Learn

Congratulations! You have completed all the steps required to build a basic blockchain! In this exercise, we will bring the key parts together to review what we have built so far.

*Note: * The blockchain we have built only exists on a local machine. It is important to know that actual blockchain applications operate on multiple computers in a decentralized manner.

Instructions

1.

Create a Blockchain object named local_blockchain. Verify that this automatically creates a Genesis Block by printing out the contents of local_blockchain.

2.

Individually add block_one_transactions, block_two_transactions, and block_three_transactions respectively into local_blockchain. Print out the contents of local_blockchain to see what the block holds.

3.

Modify the second block you added in local_blockchain by changing the block’s transactions to fake_transactions. Check to see if the blockchain is still valid using the correct method.

Folder Icon

Sign up to start coding

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

Already have an account?