@@ -24,7 +24,7 @@ use std::{env, thread};
24
24
use clarity:: vm:: types:: PrincipalData ;
25
25
use libsigner:: v0:: messages:: {
26
26
BlockAccepted , BlockRejection , BlockResponse , MessageSlotID , MinerSlotID , PeerInfo , RejectCode ,
27
- SignerMessage ,
27
+ RejectReason , SignerMessage ,
28
28
} ;
29
29
use libsigner:: {
30
30
BlockProposal , BlockProposalData , SignerSession , StackerDBSession , VERSION_STRING ,
@@ -1277,15 +1277,14 @@ fn block_proposal_rejection() {
1277
1277
reason : _reason,
1278
1278
reason_code,
1279
1279
signer_signature_hash,
1280
+ response_data,
1280
1281
..
1281
1282
} ) ) = message
1282
1283
{
1283
1284
if signer_signature_hash == block_signer_signature_hash_1 {
1284
1285
found_signer_signature_hash_1 = true ;
1285
- assert ! (
1286
- matches!( reason_code, RejectCode :: InvalidBitvec ) ,
1287
- "Expected sortition view mismatch rejection. Got: {reason_code}"
1288
- ) ;
1286
+ assert_eq ! ( reason_code, RejectCode :: SortitionViewMismatch , ) ;
1287
+ assert_eq ! ( response_data. reject_reason, RejectReason :: InvalidBitvec ) ;
1289
1288
} else if signer_signature_hash == block_signer_signature_hash_2 {
1290
1289
found_signer_signature_hash_2 = true ;
1291
1290
assert ! ( matches!(
@@ -3785,10 +3784,12 @@ fn empty_sortition() {
3785
3784
if let SignerMessage :: BlockResponse ( BlockResponse :: Rejected ( BlockRejection {
3786
3785
reason_code,
3787
3786
metadata,
3787
+ response_data,
3788
3788
..
3789
3789
} ) ) = latest_msg
3790
3790
{
3791
- assert ! ( matches!( reason_code, RejectCode :: InvalidMiner ) ) ;
3791
+ assert_eq ! ( reason_code, RejectCode :: SortitionViewMismatch ) ;
3792
+ assert_eq ! ( response_data. reject_reason, RejectReason :: InvalidMiner ) ;
3792
3793
assert_eq ! ( metadata. server_version, VERSION_STRING . to_string( ) ) ;
3793
3794
found_rejections. push ( * slot_id) ;
3794
3795
} else {
0 commit comments