inspired by Build a cryptocurrency! - Blockchain in Rust by Jacob Lindahl, GeekLaunch
contributed by Siddhant Rao
Structure definition:
pub struct Block {
pub index: u32,
pub timestamp: u128,
pub hash: Hash,
pub prev_block_hash: Hash,
pub nonce: u64,
pub transactions: Vec<Transaction>,
pub difficulty: u128,
}
To run use:
$ cargo run
See too_chainz
.