Skip to content

Commit 3150d4c

Browse files
committed
chore: awaken coordinator thread on new sortition since a stacks block may be buffered
1 parent e1046fd commit 3150d4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testnet/stacks-node/src/nakamoto_node/relayer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ impl RelayerThread {
415415
.expect("FATAL: failed to query sortition DB for epoch")
416416
.expect("FATAL: no epoch defined for existing sortition");
417417

418-
if cur_epoch.epoch_id != StacksEpochId::Epoch30 {
418+
if cur_epoch.epoch_id < StacksEpochId::Epoch30 {
419419
debug!(
420420
"As of sortition {}, there has not yet been a Nakamoto tip. Cannot mine.",
421421
&stacks_tip_sn.consensus_hash
@@ -454,6 +454,9 @@ impl RelayerThread {
454454
}
455455
self.globals.set_last_sortition(sn.clone());
456456

457+
// there may be a bufferred stacks block to process, so wake up the coordinator to check
458+
self.globals.coord_comms.announce_new_stacks_block();
459+
457460
info!(
458461
"Relayer: Process sortition";
459462
"sortition_ch" => %consensus_hash,

0 commit comments

Comments
 (0)