Skip to content

Commit

Permalink
fix(mining): make sure the age reset only happens when the previous b…
Browse files Browse the repository at this point in the history
…lock was part of wit\2
  • Loading branch information
drcpu-github committed Jun 14, 2024
1 parent 7d959d1 commit d26913b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion node/src/actors/chain_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,9 @@ impl ChainManager {
let miner_pkh = block.block_header.proof.proof.pkh();

// Reset the coin age of the miner for all staked coins
let _ = stakes.reset_age(miner_pkh, Capability::Mining, current_epoch);
if get_protocol_version(Some(block_epoch)) == ProtocolVersion::V2_0 {
let _ = stakes.reset_age(miner_pkh, Capability::Mining, current_epoch);
}

// Do not update reputation or stakes when consolidating genesis block
if block_hash != chain_info.consensus_constants.genesis_hash {
Expand Down

0 comments on commit d26913b

Please sign in to comment.