aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-01-09 13:06:04 +0800
committerzelig <viktor.tron@gmail.com>2015-01-09 13:06:04 +0800
commit43ed0ed1ae6e77a259d47ed47a25366f3b212f11 (patch)
tree48015655981ce8383275cdb5553531971f363b9e /eth/protocol.go
parent69dfca2feb5c94f7a28a0b24c28181b6da4b9da3 (diff)
downloadgo-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.tar
go-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.tar.gz
go-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.tar.bz2
go-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.tar.lz
go-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.tar.xz
go-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.tar.zst
go-tangerine-43ed0ed1ae6e77a259d47ed47a25366f3b212f11.zip
no need to call AddBlockHashes when receiving new block
Diffstat (limited to 'eth/protocol.go')
-rw-r--r--eth/protocol.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/eth/protocol.go b/eth/protocol.go
index 736bcd94b..c9a5dea8d 100644
--- a/eth/protocol.go
+++ b/eth/protocol.go
@@ -211,16 +211,6 @@ func (self *ethProtocol) handle() error {
// uses AddPeer followed by AddHashes, AddBlock only if peer is the best peer
// (or selected as new best peer)
if self.blockPool.AddPeer(request.TD, hash, self.id, self.requestBlockHashes, self.requestBlocks, self.protoErrorDisconnect) {
- called := true
- iter := func() ([]byte, bool) {
- if called {
- called = false
- return hash, true
- } else {
- return nil, false
- }
- }
- self.blockPool.AddBlockHashes(iter, self.id)
self.blockPool.AddBlock(request.Block, self.id)
}