Skip to content

Commit d073dca

Browse files
committed
Propagate bip30_deactivate_hash in chain state.
1 parent ee9cfb9 commit d073dca

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/chain/chain_state.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,10 @@ chain_state::data chain_state::to_block(const chain_state& pool,
651651
data.timestamp.self = header.timestamp();
652652
data.cumulative_work += header.proof();
653653

654+
// Cache hash of bip30_deactivate block, otherwise use preceding state.
655+
if (data.height == settings.bip30_deactivate_checkpoint.height())
656+
data.bip30_deactivate_hash = data.hash;
657+
654658
// Cache hash of bip9 bit0 height block, otherwise use preceding state.
655659
if (data.height == settings.bip9_bit0_active_checkpoint.height())
656660
data.bip9_bit0_hash = data.hash;
@@ -690,6 +694,10 @@ chain_state::data chain_state::to_header(const chain_state& parent,
690694
data.timestamp.self = header.timestamp();
691695
data.cumulative_work += header.proof();
692696

697+
// Cache hash of bip30_deactivate block, otherwise use preceding state.
698+
if (data.height == settings.bip30_deactivate_checkpoint.height())
699+
data.bip30_deactivate_hash = data.hash;
700+
693701
// Cache hash of bip9 bit0 height block, otherwise use preceding state.
694702
if (data.height == settings.bip9_bit0_active_checkpoint.height())
695703
data.bip9_bit0_hash = data.hash;

0 commit comments

Comments
 (0)