Fixed ability to stop mining if we are waiting for signing blocks in miner.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "alfis"
|
name = "alfis"
|
||||||
version = "0.4.10"
|
version = "0.4.11"
|
||||||
authors = ["Revertron <alfis@revertron.com>"]
|
authors = ["Revertron <alfis@revertron.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|||||||
@@ -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 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");
|
//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
|
// We can't mine now, as we need to wait for block to be signed
|
||||||
thread::sleep(Duration::from_millis(5000));
|
thread::sleep(Duration::from_millis(5000));
|
||||||
|
|||||||
Reference in New Issue
Block a user