Showing posts with label Block chain. Show all posts
Showing posts with label Block chain. Show all posts

Wednesday, July 25, 2018

Simple block chain code with Java

A blockchain is the structure of data that represents a financial ledger entry, or a record of a transaction. Block chain contains list of blocks, each block will contain transaction and a hashcode of previous block. similarly next block will contain its transaction and hashcode of current block thus if any of the transaction value gets change in blockchain subsequent blocks hashcode will change.



If you dont know about hashcode, The hashcode of a Java Object is simply a number, it is 32-bit signed int, that allows an object to be managed by a hash-based data structure.

Transaction.java - It contains transaction information