mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 11:31:08 +03:00
Cleanup genesis.rs a bit (#2390)
This commit is contained in:
parent
e7485ab5f1
commit
8badb58665
1 changed files with 3 additions and 5 deletions
|
@ -46,8 +46,7 @@ pub fn genesis_dev() -> core::Block {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Placeholder for floonet genesis block, will definitely change before
|
/// Floonet genesis block
|
||||||
/// release
|
|
||||||
pub fn genesis_floo() -> core::Block {
|
pub fn genesis_floo() -> core::Block {
|
||||||
let gen = core::Block::with_header(core::BlockHeader {
|
let gen = core::Block::with_header(core::BlockHeader {
|
||||||
height: 0,
|
height: 0,
|
||||||
|
@ -165,8 +164,7 @@ pub fn genesis_floo() -> core::Block {
|
||||||
gen.with_reward(output, kernel)
|
gen.with_reward(output, kernel)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Placeholder for mainnet genesis block, will definitely change before
|
/// Mainnet genesis block
|
||||||
/// release so no use trying to pre-mine it.
|
|
||||||
pub fn genesis_main() -> core::Block {
|
pub fn genesis_main() -> core::Block {
|
||||||
let gen = core::Block::with_header(core::BlockHeader {
|
let gen = core::Block::with_header(core::BlockHeader {
|
||||||
height: 0,
|
height: 0,
|
||||||
|
@ -311,7 +309,7 @@ mod test {
|
||||||
let gen_hash = genesis_main().hash();
|
let gen_hash = genesis_main().hash();
|
||||||
println!("mainnet genesis hash: {}", gen_hash.to_hex());
|
println!("mainnet genesis hash: {}", gen_hash.to_hex());
|
||||||
let gen_bin = ser::ser_vec(&genesis_main()).unwrap();
|
let gen_bin = ser::ser_vec(&genesis_main()).unwrap();
|
||||||
println!("floonet genesis full hash: {}\n", gen_bin.hash().to_hex());
|
println!("mainnet genesis full hash: {}\n", gen_bin.hash().to_hex());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
gen_hash.to_hex(),
|
gen_hash.to_hex(),
|
||||||
"40adad0aec27797b48840aa9e00472015c21baea118ce7a2ff1a82c0f8f5bf82"
|
"40adad0aec27797b48840aa9e00472015c21baea118ce7a2ff1a82c0f8f5bf82"
|
||||||
|
|
Loading…
Reference in a new issue