From 8e66aae59200ff4eb3a229d8bde8786bb333fe46 Mon Sep 17 00:00:00 2001
From: Ignotus Peverell <igno.peverell@protonmail.com>
Date: Wed, 3 Oct 2018 09:08:25 -0700
Subject: [PATCH] Don't push mined blocks to the chain during sync (#1643)

Related to #1632
---
 servers/src/mining/stratumserver.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/servers/src/mining/stratumserver.rs b/servers/src/mining/stratumserver.rs
index b1b6b3bac..1b8892748 100644
--- a/servers/src/mining/stratumserver.rs
+++ b/servers/src/mining/stratumserver.rs
@@ -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 {