Fixed ability to stop mining if we are waiting for signing blocks in miner.

This commit is contained in:
Revertron
2021-04-18 18:05:33 +02:00
parent 1997ccc298
commit dd558464a5
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -232,6 +232,9 @@ fn find_hash(context: Arc<Mutex<Context>>, mut block: Block, running: Arc<Atomic
};
if full && next_allowed_block > block.index {
if !running.load(Ordering::Relaxed) {
return None;
}
//trace!("Mining full block is not allowed until previous is not signed");
// We can't mine now, as we need to wait for block to be signed
thread::sleep(Duration::from_millis(5000));