Skip to content

Commit 51e46fa

Browse files
committed
Simplify logic to ensure at reward cycle boundaries, the old reward cycle is used
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 11de2a3 commit 51e46fa

File tree

1 file changed

+1
-8
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+1
-8
lines changed

testnet/stacks-node/src/tests/signer/v0.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl SignerTest<SpawnedSigner> {
293293
fn mine_and_verify_confirmed_naka_block(&mut self, timeout: Duration, num_signers: usize) {
294294
info!("------------------------- Try mining one block -------------------------");
295295

296-
let old_reward_cycle = self.get_current_reward_cycle();
296+
let reward_cycle = self.get_current_reward_cycle();
297297

298298
self.mine_nakamoto_block(timeout);
299299

@@ -312,13 +312,6 @@ impl SignerTest<SpawnedSigner> {
312312
// NOTE: signature.len() does not need to equal signers.len(); the stacks miner can finish the block
313313
// whenever it has crossed the threshold.
314314
assert!(signature.len() >= num_signers * 7 / 10);
315-
316-
let new_reward_cycle = self.get_current_reward_cycle();
317-
let reward_cycle = if new_reward_cycle != old_reward_cycle {
318-
old_reward_cycle
319-
} else {
320-
new_reward_cycle
321-
};
322315
info!(
323316
"Verifying signatures against signers for reward cycle {:?}",
324317
reward_cycle

0 commit comments

Comments
 (0)