Don't push mined blocks to the chain during sync (#1643)

Related to #1632
This commit is contained in:
Ignotus Peverell 2018-10-03 09:08:25 -07:00 committed by GitHub
parent 2919a78b0f
commit 8e66aae592
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -502,7 +502,7 @@ impl StratumServer {
return Err(serde_json::to_value(e).unwrap());
}
// If the difficulty is high enough, submit it (which also validates it)
if share_difficulty >= self.current_difficulty {
if share_difficulty >= self.current_difficulty && !self.sync_state.is_syncing() {
// This is a full solution, submit it to the network
let res = self.chain.process_block(b.clone(), chain::Options::MINE);
if let Err(e) = res {