Skip to content

Commit

Permalink
signing_in_0th_tenure_of_reward_cycle should only check signers who s…
Browse files Browse the repository at this point in the history
…igned the block

Signed-off-by: Jacinta Ferrant <[email protected]>
  • Loading branch information
jferrant committed Oct 23, 2024
1 parent c798615 commit 18ea947
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5316,7 +5316,19 @@ fn signing_in_0th_tenure_of_reward_cycle() {
})
.unwrap();

for signer in &signer_public_keys {
let block_mined = test_observer::get_mined_nakamoto_blocks()
.last()
.unwrap()
.clone();
// Must ensure that the signers that signed the block have their blocks_signed updated appropriately
for signature in &block_mined.signer_signature {
let signer = signer_public_keys
.iter()
.find(|pk| {
pk.verify(block_mined.signer_signature_hash.as_bytes(), signature)
.unwrap()
})
.expect("Unknown signer signature");
let blocks_signed = get_v3_signer(&signer, next_reward_cycle);
assert_eq!(blocks_signed, 1);
}
Expand Down

0 comments on commit 18ea947

Please sign in to comment.