From 32559ccad1e0519ce1decc4b90df021fe215a811 Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Thu, 2 Jun 2016 15:54:07 +0300 Subject: eth: don't accept transactions until we sync up with the network --- eth/sync.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'eth/sync.go') diff --git a/eth/sync.go b/eth/sync.go index 4b16c1322..52f7e90e7 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -174,6 +174,8 @@ func (pm *ProtocolManager) synchronise(peer *peer) { if err := pm.downloader.Synchronise(peer.id, peer.Head(), peer.Td(), mode); err != nil { return } + atomic.StoreUint32(&pm.synced, 1) // Mark initial sync done + // If fast sync was enabled, and we synced up, disable it if atomic.LoadUint32(&pm.fastSync) == 1 { // Disable fast sync if we indeed have something in our chain -- cgit