Skip to content

Commit 772798b

Browse files
committed
fix: use pending burn block in bitcoin_block_arrival
1 parent d422eae commit 772798b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

stacks-signer/src/v0/signer_state.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -564,15 +564,7 @@ impl LocalStateMachine {
564564
// to be changed.
565565
match update {
566566
StateMachineUpdate::BurnBlock(pending_burn_block) => {
567-
match expected_burn_block {
568-
None => expected_burn_block = Some(pending_burn_block),
569-
Some(ref expected) => {
570-
if pending_burn_block.burn_block_height > expected.burn_block_height
571-
{
572-
expected_burn_block = Some(pending_burn_block);
573-
}
574-
}
575-
}
567+
expected_burn_block = Some(pending_burn_block);
576568
}
577569
}
578570

@@ -595,9 +587,11 @@ impl LocalStateMachine {
595587
&& next_burn_block_hash != expected_burn_block.consensus_hash;
596588
if node_behind_expected || node_on_equal_fork {
597589
let err_msg = format!(
598-
"Node has not processed the next burn block yet. Expected height = {}, Expected consensus hash = {}",
590+
"Node has not processed the next burn block yet. Expected height = {}, Expected consensus hash = {}, Node height = {}, Node consensus hash = {}",
599591
expected_burn_block.burn_block_height,
600592
expected_burn_block.consensus_hash,
593+
next_burn_block_height,
594+
next_burn_block_hash,
601595
);
602596
*self = Self::Pending {
603597
update: StateMachineUpdate::BurnBlock(expected_burn_block),

0 commit comments

Comments
 (0)