Skip to content

Commit 4daf74d

Browse files
authored
Merge pull request #5103 from stacks-network/hotfix/mock-signature-message-slot
Reuse BlockResponse slot for MockSignature message type
2 parents 75df60f + ee28db9 commit 4daf74d

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

libsigner/src/v0/messages.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,7 @@ impl SignerMessage {
185185
pub fn msg_id(&self) -> Option<MessageSlotID> {
186186
match self {
187187
Self::BlockProposal(_) | Self::BlockPushed(_) => None,
188-
Self::BlockResponse(_) => Some(MessageSlotID::BlockResponse),
189-
Self::MockSignature(_) => Some(MessageSlotID::MockSignature),
188+
Self::BlockResponse(_) | Self::MockSignature(_) => Some(MessageSlotID::BlockResponse), // Mock signature reuses the same slot as block response since its exclusively used in Epoch 2.5
190189
}
191190
}
192191
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,8 +2212,8 @@ fn mock_sign_epoch_25() {
22122212
std::thread::sleep(Duration::from_millis(100));
22132213
let messages: Vec<SignerMessage> = StackerDB::get_messages(
22142214
stackerdb
2215-
.get_session_mut(&MessageSlotID::MockSignature)
2216-
.expect("Failed to get BlockResponse stackerdb session"),
2215+
.get_session_mut(&MessageSlotID::BlockResponse)
2216+
.expect("Failed to get BlockResponse stackerdb session"), // Epoch 2.5 MockSignatures use the BlockResponse slot
22172217
&signer_slot_ids,
22182218
)
22192219
.expect("Failed to get message from stackerdb");

0 commit comments

Comments
 (0)