diff options
author | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2017-01-23 09:35:46 +0800 |
---|---|---|
committer | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2017-01-26 11:23:53 +0800 |
commit | 12379c697aa72f4ce08733638e6f7e5dcdf3f94f (patch) | |
tree | c3f44e91386e0eb8fcd64a7ebdf5cf9ef20991df /eth/sync.go | |
parent | f5348e17f8d487a7bd34ccef6dcb6dc376407f40 (diff) | |
download | dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.tar dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.tar.gz dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.tar.bz2 dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.tar.lz dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.tar.xz dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.tar.zst dexon-12379c697aa72f4ce08733638e6f7e5dcdf3f94f.zip |
les: remove delayed les server starting
Diffstat (limited to 'eth/sync.go')
-rw-r--r-- | eth/sync.go | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/eth/sync.go b/eth/sync.go index 234534b4f..373cc2054 100644 --- a/eth/sync.go +++ b/eth/sync.go @@ -181,7 +181,7 @@ func (pm *ProtocolManager) synchronise(peer *peer) { if err := pm.downloader.Synchronise(peer.id, pHead, pTd, mode); err != nil { return } - pm.setSynced() // Mark initial sync done + 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 { @@ -192,10 +192,3 @@ func (pm *ProtocolManager) synchronise(peer *peer) { } } } - -// setSynced sets the synced flag and notifies the light server if present -func (pm *ProtocolManager) setSynced() { - if atomic.SwapUint32(&pm.synced, 1) == 0 && pm.lesServer != nil { - pm.lesServer.Synced() - } -} |