Skip to content

Commit 116d8b8

Browse files
committed
fix: update tests that check the reject code
1 parent d537741 commit 116d8b8

File tree

1 file changed

+4
-7
lines changed
  • testnet/stacks-node/src/tests/signer

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ fn block_proposal_rejection() {
554554
if signer_signature_hash == block_signer_signature_hash_1 {
555555
found_signer_signature_hash_1 = true;
556556
assert!(
557-
matches!(reason_code, RejectCode::SortitionViewMismatch),
557+
matches!(reason_code, RejectCode::InvalidBitvec),
558558
"Expected sortition view mismatch rejection. Got: {reason_code}"
559559
);
560560
} else if signer_signature_hash == block_signer_signature_hash_2 {
@@ -3478,7 +3478,7 @@ fn empty_sortition() {
34783478
..
34793479
})) = latest_msg
34803480
{
3481-
assert!(matches!(reason_code, RejectCode::SortitionViewMismatch));
3481+
assert!(matches!(reason_code, RejectCode::InvalidMiner));
34823482
assert_eq!(metadata.server_version, VERSION_STRING.to_string());
34833483
found_rejections.push(*slot_id);
34843484
} else {
@@ -11679,10 +11679,7 @@ fn reorg_attempts_activity_timeout_exceeded() {
1167911679
match message {
1168011680
SignerMessage::BlockResponse(BlockResponse::Rejected(rejection)) => {
1168111681
if rejection.signer_signature_hash == hash {
11682-
assert_eq!(
11683-
rejection.reason_code,
11684-
RejectCode::SortitionViewMismatch
11685-
);
11682+
assert_eq!(rejection.reason_code, RejectCode::InvalidMiner);
1168611683
Some(rejection)
1168711684
} else {
1168811685
None
@@ -12411,7 +12408,7 @@ fn block_proposal_timeout() {
1241112408
if rejection.signer_signature_hash
1241212409
== block_proposal_n.block.header.signer_signature_hash()
1241312410
{
12414-
assert_eq!(rejection.reason_code, RejectCode::SortitionViewMismatch);
12411+
assert_eq!(rejection.reason_code, RejectCode::InvalidMiner);
1241512412
Some(rejection)
1241612413
} else {
1241712414
None

0 commit comments

Comments
 (0)