aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-04-13 23:35:25 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-04-13 23:35:25 +0800
commit1fa844aaf51beae9129b52a52f51b6602c52ccdb (patch)
tree725febd840e5dd2b262ff6a1399f26c55884311d /eth
parent5f9346bc7afd64706b3815aec6be2b2650929a6b (diff)
parent3d57e377a4e95941fd3f572b42e073b40d10d27c (diff)
downloadgo-tangerine-1fa844aaf51beae9129b52a52f51b6602c52ccdb.tar.gz
go-tangerine-1fa844aaf51beae9129b52a52f51b6602c52ccdb.tar.zst
go-tangerine-1fa844aaf51beae9129b52a52f51b6602c52ccdb.zip
Merge pull request #702 from ethersphere/frontier/blockpool
blockpool stability fixes:
Diffstat (limited to 'eth')
-rw-r--r--eth/protocol.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/eth/protocol.go b/eth/protocol.go
index 878038f74..1a19307db 100644
--- a/eth/protocol.go
+++ b/eth/protocol.go
@@ -299,7 +299,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)
}
@@ -384,11 +384,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)
+ }
+
}