aboutsummaryrefslogtreecommitdiffstats
path: root/eth/sync.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2016-06-06 20:12:27 +0800
committerPéter Szilágyi <peterke@gmail.com>2016-06-06 20:12:27 +0800
commitfdd61b83ffe1ac0e3ef0621acbd92dd61df9910d (patch)
tree9955f4f42ecc8f946daf064ff68df58c38225801 /eth/sync.go
parent826efc22957bfdc4e23775f71ad77fdeed11fd6e (diff)
parent32559ccad1e0519ce1decc4b90df021fe215a811 (diff)
downloaddexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.tar
dexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.tar.gz
dexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.tar.bz2
dexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.tar.lz
dexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.tar.xz
dexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.tar.zst
dexon-fdd61b83ffe1ac0e3ef0621acbd92dd61df9910d.zip
Merge pull request #2649 from karalabe/omit-startup-tx-processing
eth: don't accept transactions until we sync up with the network
Diffstat (limited to 'eth/sync.go')
-rw-r--r--eth/sync.go2
1 files changed, 2 insertions, 0 deletions
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