This is your last blockchain assignment! In this assignment, we will validate the contents of the block chain. Your program should evaluate files Block1.txt, Block2.txt and Block3.txt in order. The outputs should be exactly as shown below. This 1) makes grading easier, and 2) is what you will have to do in industry, anyway.
If the blocks are all OK, the output should be:
Error Conditions:
If the Block2.txt block hash is changed, the following error messages are printed:
If the Block2.txt nonce is changed:
If a Merkle Tree element is changed:
If the Block2.tst previous block hash is changed:
And in this case, the 5th transaction in Block2.txt was altered:
The given Block1.txt, Block2.txt and Block3.txt results are:
Name your file HW6_<YourName>.java. Please post only your java file to Blackboard.