Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Simplify logic to ensure at reward cycle boundaries, the old reward c…
Browse files Browse the repository at this point in the history
…ycle is used

Signed-off-by: Jacinta Ferrant <[email protected]>
  • Loading branch information
jferrant committed Aug 20, 2024
1 parent 11de2a3 commit 51e46fa
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl SignerTest<SpawnedSigner> {
fn mine_and_verify_confirmed_naka_block(&mut self, timeout: Duration, num_signers: usize) {
info!("------------------------- Try mining one block -------------------------");

let old_reward_cycle = self.get_current_reward_cycle();
let reward_cycle = self.get_current_reward_cycle();

self.mine_nakamoto_block(timeout);

Expand All @@ -312,13 +312,6 @@ impl SignerTest<SpawnedSigner> {
// NOTE: signature.len() does not need to equal signers.len(); the stacks miner can finish the block
// whenever it has crossed the threshold.
assert!(signature.len() >= num_signers * 7 / 10);

let new_reward_cycle = self.get_current_reward_cycle();
let reward_cycle = if new_reward_cycle != old_reward_cycle {
old_reward_cycle
} else {
new_reward_cycle
};
info!(
"Verifying signatures against signers for reward cycle {:?}",
reward_cycle
Expand Down

0 comments on commit 51e46fa

Please sign in to comment.