diff --git a/src/chain/chain_state.cpp b/src/chain/chain_state.cpp index 1d320bcf9e..43f4c4fb81 100644 --- a/src/chain/chain_state.cpp +++ b/src/chain/chain_state.cpp @@ -427,8 +427,8 @@ size_t chain_state::bip9_bit0_height(size_t height, { const auto activation_height = bip9_bit0_active_checkpoint.height(); - // Require bip9_bit0 hash at heights above historical bip9_bit0 activation. - return height > activation_height ? activation_height : map::unrequested; + // Require bip9_bit0 hash at heights at/above bip9_bit0 activation. + return height < activation_height ? map::unrequested : activation_height; } size_t chain_state::bip9_bit1_height(size_t height, @@ -436,8 +436,8 @@ size_t chain_state::bip9_bit1_height(size_t height, { const auto activation_height = bip9_bit1_active_checkpoint.height(); - // Require bip9_bit1 hash at heights above historical bip9_bit1 activation. - return height > activation_height ? activation_height : map::unrequested; + // Require bip9_bit1 hash at heights at/above bip9_bit1 activation. + return height < activation_height ? map::unrequested : activation_height; } // Public static @@ -472,11 +472,11 @@ chain_state::map chain_state::get_map(size_t height, // The most recent past retarget height. map.timestamp_retarget = retarget_height(height, forks, interval); - // The checkpoint above which bip9_bit0 rules are enforced. + // The checkpoint at/above which bip9_bit0 rules are enforced. map.bip9_bit0_height = bip9_bit0_height(height, settings.bip9_bit0_active_checkpoint); - // The checkpoint above which bip9_bit1 rules are enforced. + // The checkpoint at/above which bip9_bit1 rules are enforced. map.bip9_bit1_height = bip9_bit1_height(height, settings.bip9_bit1_active_checkpoint);