diff options
author | Felix Lange <fjl@users.noreply.github.com> | 2017-02-01 09:03:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 09:03:43 +0800 |
commit | 9c45b4462c2453c0c92282290d9788aecf556798 (patch) | |
tree | 8746adcd24b48828a665b84ab87916e06df118ed /eth/sync.go | |
parent | 690f6ea1d74f949d4830d3a38c786510fc43d37c (diff) | |
parent | a390ca5f30e871715f28937a02e87fff050b0c75 (diff) | |
download | dexon-9c45b4462c2453c0c92282290d9788aecf556798.tar dexon-9c45b4462c2453c0c92282290d9788aecf556798.tar.gz dexon-9c45b4462c2453c0c92282290d9788aecf556798.tar.bz2 dexon-9c45b4462c2453c0c92282290d9788aecf556798.tar.lz dexon-9c45b4462c2453c0c92282290d9788aecf556798.tar.xz dexon-9c45b4462c2453c0c92282290d9788aecf556798.tar.zst dexon-9c45b4462c2453c0c92282290d9788aecf556798.zip |
Merge pull request #3607 from zsfelfoldi/light-fix2
les: fix private net issues, enable adding peers manually again
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() - } -} |