Question: Background: Blockchains are made up of individual components called blocks. These blocks contain two pieces of information: a numeric representation or hash of the previous
Background: Blockchains are made up of individual components called blocks. These blocks
contain two pieces of information: a numeric representation or hash of the previous block and a
list of transactions. The previous block hash is generated using these two fields.
A common action performed by a blockchain user is seeing if a particular transaction is present
in the given block. To achieve this, the user must calculate the local hash and compare them
against the hash stored on the blockchain. If they match, then the given transaction should be
present in the given block.
Page of
Using the Block. java file implement a main method in a separate class that checks if
transaction is present in the sample blockchain provided in the below figure.
Fig: Sample Blockchain
Hint: Which hash has the information stored about the block with
Note: DO NOT make any changes to Block.java.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
