Skip to content

Latest commit

 

History

History
 
 

blockchain.rs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

blockchain.rs - Build your own blockchain from scratch in Rust

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 

Sources

See too_chainz.