From 60cbe3343e905816366bc0c7ff26c98cdee78eed Mon Sep 17 00:00:00 2001 From: debris Date: Mon, 21 Dec 2015 15:28:12 +0100 Subject: [PATCH] updated docs for genesis --- src/genesis.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/genesis.rs b/src/genesis.rs index a69683cdf..d4829a70e 100644 --- a/src/genesis.rs +++ b/src/genesis.rs @@ -38,6 +38,7 @@ impl Genesis { Self::new_from_header_and_state(header, state) } + /// Creates genesis block from header and state hashmap pub fn new_from_header_and_state(header: Header, state: HashMap) -> Genesis { let empty_list = RlpStream::new_list(0).out(); let mut stream = RlpStream::new_list(3); @@ -76,6 +77,7 @@ impl Genesis { timestamp: U256::from_str(&json["timestamp"].as_string().unwrap()[2..]).unwrap(), extra_data: json["extraData"].as_string().unwrap()[2..].from_hex().unwrap(), seal: { + // ethash specific fields let mixhash = H256::from_str(&json["mixhash"].as_string().unwrap()[2..]).unwrap(); let nonce = H64::from_str(&json["nonce"].as_string().unwrap()[2..]).unwrap(); vec![mixhash.to_vec(), nonce.to_vec()]