Skip to content

Commit

Permalink
fix: don't use standard epoch indices in assert_valid_epoch_settings
Browse files Browse the repository at this point in the history
The list of epochs passed in here is not complete, so we cannot use the
standard epoch indices for it.
  • Loading branch information
obycode committed Oct 21, 2024
1 parent 26d7aaf commit 8e097ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion testnet/stacks-node/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ impl Config {
let _ = StacksEpoch::validate_epochs(epochs);

// sanity check: v1_unlock_height must happen after pox-2 instantiation
let epoch21_index = StacksEpochId::Epoch21.index();
let epoch21_index = StacksEpoch::find_epoch_by_id(&epochs, StacksEpochId::Epoch21)
.expect("FATAL: no epoch 2.1 defined");
let epoch21 = &epochs[epoch21_index];
let v1_unlock_height = burnchain.pox_constants.v1_unlock_height as u64;

Expand Down

0 comments on commit 8e097ef

Please sign in to comment.