Skip to content

Commit bf79d64

Browse files
committed
fix: resolve merge errors
1 parent 539bf01 commit bf79d64

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

testnet/stacks-node/src/tests/nakamoto_integrations.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use clarity::vm::types::{PrincipalData, QualifiedContractIdentifier};
2828
use clarity::vm::{ClarityName, ClarityVersion, Value};
2929
use http_types::headers::AUTHORIZATION;
3030
use lazy_static::lazy_static;
31-
use libsigner::v0::messages::{RejectCode, SignerMessage as SignerMessageV0};
31+
use libsigner::v0::messages::{RejectReason, SignerMessage as SignerMessageV0};
3232
use libsigner::{SignerSession, StackerDBSession};
3333
use rusqlite::OptionalExtension;
3434
use stacks::burnchains::{MagicBytes, Txid};
@@ -6599,7 +6599,7 @@ fn signer_chainstate() {
65996599
.expect_err("Sortitions view should reject proposals from prior tenure");
66006600
assert_eq!(
66016601
reject_code,
6602-
RejectCode::NotLatestSortitionWinner,
6602+
RejectReason::NotLatestSortitionWinner,
66036603
"Sortitions view should reject proposals from prior tenure"
66046604
);
66056605
for block in prior_tenure_interims.iter() {
@@ -6608,7 +6608,7 @@ fn signer_chainstate() {
66086608
.expect_err("Sortitions view should reject proposals from prior tenure");
66096609
assert_eq!(
66106610
reject_code,
6611-
RejectCode::NotLatestSortitionWinner,
6611+
RejectReason::NotLatestSortitionWinner,
66126612
"Sortitions view should reject proposals from prior tenure"
66136613
);
66146614
}

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use std::{env, thread};
2424
use clarity::vm::types::PrincipalData;
2525
use libsigner::v0::messages::{
2626
BlockAccepted, BlockRejection, BlockResponse, MessageSlotID, MinerSlotID, PeerInfo, RejectCode,
27-
SignerMessage,
27+
RejectReason, SignerMessage,
2828
};
2929
use libsigner::{
3030
BlockProposal, BlockProposalData, SignerSession, StackerDBSession, VERSION_STRING,
@@ -1277,15 +1277,14 @@ fn block_proposal_rejection() {
12771277
reason: _reason,
12781278
reason_code,
12791279
signer_signature_hash,
1280+
response_data,
12801281
..
12811282
})) = message
12821283
{
12831284
if signer_signature_hash == block_signer_signature_hash_1 {
12841285
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);
12891288
} else if signer_signature_hash == block_signer_signature_hash_2 {
12901289
found_signer_signature_hash_2 = true;
12911290
assert!(matches!(
@@ -3785,10 +3784,12 @@ fn empty_sortition() {
37853784
if let SignerMessage::BlockResponse(BlockResponse::Rejected(BlockRejection {
37863785
reason_code,
37873786
metadata,
3787+
response_data,
37883788
..
37893789
})) = latest_msg
37903790
{
3791-
assert!(matches!(reason_code, RejectCode::InvalidMiner));
3791+
assert_eq!(reason_code, RejectCode::SortitionViewMismatch);
3792+
assert_eq!(response_data.reject_reason, RejectReason::InvalidMiner);
37923793
assert_eq!(metadata.server_version, VERSION_STRING.to_string());
37933794
found_rejections.push(*slot_id);
37943795
} else {

0 commit comments

Comments
 (0)