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 1 of 2
Using the Block. java file implement a main method (in a separate class) that checks if
transaction t2 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 t2?
Note: DO NOT make any changes to Block.java.
Background: Blockchains are made up of individual

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!