Skip to content

Commit 18ea947

Browse files
committed
signing_in_0th_tenure_of_reward_cycle should only check signers who signed the block
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent c798615 commit 18ea947

File tree

1 file changed

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

1 file changed

+13
-1
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5316,7 +5316,19 @@ fn signing_in_0th_tenure_of_reward_cycle() {
53165316
})
53175317
.unwrap();
53185318

5319-
for signer in &signer_public_keys {
5319+
let block_mined = test_observer::get_mined_nakamoto_blocks()
5320+
.last()
5321+
.unwrap()
5322+
.clone();
5323+
// Must ensure that the signers that signed the block have their blocks_signed updated appropriately
5324+
for signature in &block_mined.signer_signature {
5325+
let signer = signer_public_keys
5326+
.iter()
5327+
.find(|pk| {
5328+
pk.verify(block_mined.signer_signature_hash.as_bytes(), signature)
5329+
.unwrap()
5330+
})
5331+
.expect("Unknown signer signature");
53205332
let blocks_signed = get_v3_signer(&signer, next_reward_cycle);
53215333
assert_eq!(blocks_signed, 1);
53225334
}

0 commit comments

Comments
 (0)