Skip to content

Commit

Permalink
fix(main_loop): Tell miner to continue in race-condition case
Browse files Browse the repository at this point in the history
In the case where the miner sends main loop something that doesn't build
on tip (block proposal or new block), the miner waits for main loop to
tell it to continue, but prior to this commit, that message never came.
  • Loading branch information
Sword-Smith committed Nov 27, 2024
1 parent 8f72470 commit 968ed8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ impl MainLoopHandler {

if !global_state_mut.incoming_block_is_more_canonical(&new_block) {
warn!("Got new block from miner task that was not child of tip. Discarding.");
self.main_to_miner_tx.send(MainToMiner::Continue);
return Ok(());
} else {
info!(
Expand Down Expand Up @@ -547,6 +548,7 @@ impl MainLoopHandler {
slow to competitively compose blocks. Consider running the client only \
with the guesser flag set and not the compose flag."
);
self.main_to_miner_tx.send(MainToMiner::Continue);
return Ok(());
}

Expand Down

0 comments on commit 968ed8b

Please sign in to comment.