diff --git a/Cargo.toml b/Cargo.toml index 5ebbb5b..9709489 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "alfis" -version = "0.4.10" +version = "0.4.11" authors = ["Revertron "] edition = "2018" build = "build.rs" diff --git a/src/miner.rs b/src/miner.rs index 75a4d2d..5e1c0fe 100644 --- a/src/miner.rs +++ b/src/miner.rs @@ -232,6 +232,9 @@ fn find_hash(context: Arc>, mut block: Block, running: Arc 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));