OSDN Git Service
(root)
/
bytom
/
bytom-spv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53b221e
)
Add broken link to return
author
wz
<mars@bytom.io>
Fri, 13 Apr 2018 07:32:42 +0000
(15:32 +0800)
committer
Yahtoo Ma
<yahtoo.ma@gmail.com>
Sat, 14 Apr 2018 07:39:10 +0000
(15:39 +0800)
netsync/sync.go
patch
|
blob
|
history
diff --git
a/netsync/sync.go
b/netsync/sync.go
index
1411a05
..
6bb2a6a
100644
(file)
--- a/
netsync/sync.go
+++ b/
netsync/sync.go
@@
-88,10
+88,13
@@
func (sm *SyncManager) synchronise() {
if peer == nil {
return
}
- if ok:=sm.Switch().Peers().Has(peer.Key); !ok{
+
+ if ok := sm.Switch().Peers().Has(peer.Key); !ok {
log.Info("Peer disconnected")
sm.sw.StopPeerGracefully(peer)
+ return
}
+
if bestHeight > sm.chain.BestBlockHeight() {
log.Info("sync peer:", peer.Addr(), " height:", bestHeight)
sm.blockKeeper.BlockRequestWorker(peer.Key, bestHeight)