Skip to content

Commit

Permalink
Style, comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Mar 16, 2024
1 parent 65f834f commit 52dcbfc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/chain/chain_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ 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 at/above bip9_bit0 activation.
return height >= activation_height ? activation_height : map::unrequested;
return height < activation_height ? map::unrequested : activation_height;
}

size_t chain_state::bip9_bit1_height(size_t height,
Expand All @@ -437,7 +437,7 @@ 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 at/above bip9_bit1 activation.
return height >= activation_height ? activation_height : map::unrequested;
return height < activation_height ? map::unrequested : activation_height;
}

// Public static
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 52dcbfc

Please sign in to comment.