My first Go Project trying to make a simple Block chain
The Chain allows you to add previous/current block to the Chain and get a new block via the method CreateNewBlock
The block are linked with the Previous Hash Value and the Index (ToDo check on index on validate and Add)
The Block has methods
- createHash to creat the hash of the block
- Validate to validate is correct with prevHash
- ToString to help with printing to console
The first block is created with a fixed prevHash
- Update Add to check the Index
- Update Validate to check the Index