aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-16 07:14:27 +0800
committerobscuren <geffobscura@gmail.com>2015-04-16 07:28:24 +0800
commit3a51c3b584b16b408c3fbf87c4f9719fcfb1c52a (patch)
treeb2d4a5e7fcc1da2fd5b1aa3c139ddc7594c8646c /eth/protocol.go
parent97d2954e227049a089652d91e6fb0ea1c8115cc6 (diff)
parentc4678ffd77a18a9d03c888fdf242c9e5915b9f5f (diff)
downloadgo-tangerine-3a51c3b584b16b408c3fbf87c4f9719fcfb1c52a.tar.gz
go-tangerine-3a51c3b584b16b408c3fbf87c4f9719fcfb1c52a.tar.zst
go-tangerine-3a51c3b584b16b408c3fbf87c4f9719fcfb1c52a.zip
Merge branch 'develop' into downloader-proto
Diffstat (limited to 'eth/protocol.go')
-rw-r--r--eth/protocol.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/eth/protocol.go b/eth/protocol.go
index b15868898..a85d15a0c 100644
--- a/eth/protocol.go
+++ b/eth/protocol.go
@@ -324,7 +324,7 @@ func (self *ethProtocol) handle() error {
// to simplify backend interface adding a new block
// uses AddPeer followed by AddBlock only if peer is the best peer
// (or selected as new best peer)
- if best, _ := self.blockPool.AddPeer(request.TD, hash, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect); best {
+ if _, suspended := self.blockPool.AddPeer(request.TD, hash, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect); !suspended {
self.blockPool.AddBlock(request.Block, self.id)
}
@@ -415,11 +415,9 @@ func (self *ethProtocol) sendStatus() error {
}
func (self *ethProtocol) protoErrorDisconnect(err *errs.Error) {
- //err.Log(self.peer.Logger)
err.Log(glog.V(logger.Info))
- /*
- if err.Fatal() {
- self.peer.Disconnect(p2p.DiscSubprotocolError)
- }
- */
+ if err.Fatal() {
+ self.peer.Disconnect(p2p.DiscSubprotocolError)
+ }
+
}