Skip to content

Commit

Permalink
Testing the pre-mine
Browse files Browse the repository at this point in the history
  • Loading branch information
hansieodendaal committed Jul 29, 2024
1 parent 5717c6e commit 706583c
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 27 deletions.
10 changes: 5 additions & 5 deletions base_layer/core/src/blocks/genesis_block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ pub fn get_esmeralda_genesis_block() -> ChainBlock {

// Hardcode the Merkle roots once they've been computed above
block.header.kernel_mr =
FixedHash::from_hex("b97afb0f165fc41e47d5a6bea4e651a16ffab2ecc6259814b42084aeac8fb959").unwrap();
FixedHash::from_hex("ce2430e5b864283a7284624363327b76b18e90aa386a25766de9f82b0de7fa77").unwrap();
block.header.output_mr =
FixedHash::from_hex("a2bbf7770db43bb1ad57c20d7737870f290618376f8b156019414abb494c23a8").unwrap();
FixedHash::from_hex("e50e4f27cf40cfd313590e88971c34ce894d7be2cbcab1d65ebf8f91ed52120b").unwrap();
block.header.validator_node_mr =
FixedHash::from_hex("277da65c40b2cf99db86baedb903a3f0a38540f3a94d40c826eecac7e27d5dfc").unwrap();
}
Expand All @@ -304,7 +304,7 @@ pub fn get_esmeralda_genesis_block() -> ChainBlock {

fn get_esmeralda_genesis_block_raw() -> Block {
// Set genesis timestamp
let genesis_timestamp = DateTime::parse_from_rfc2822("12 Jul 2024 08:00:00 +0200").expect("parse may not fail");
let genesis_timestamp = DateTime::parse_from_rfc2822("29 Jul 2024 00:00:00 +0200").expect("parse may not fail");
// Let us add a "not before" proof to the genesis block
let not_before_proof =
b"as I sip my drink, thoughts of esmeralda consume my mind, like a refreshing nourishing draught \
Expand Down Expand Up @@ -417,11 +417,11 @@ mod test {

#[test]
#[cfg(tari_target_network_testnet)]
fn esme_genesis_sanity_check() {
fn esmeralda_genesis_sanity_check() {
// Note: Generate new data for `pub fn get_esmeralda_genesis_block()` and `fn get_esmeralda_genesis_block_raw()`
// if consensus values change, e.g. new pre_mine or other
let block = get_esmeralda_genesis_block();
check_block(Network::Esmeralda, &block, 20, 1);
check_block(Network::Esmeralda, &block, 164, 1);
}

#[test]
Expand Down
Loading

0 comments on commit 706583c

Please sign in to comment.