From 43ed0ed1ae6e77a259d47ed47a25366f3b212f11 Mon Sep 17 00:00:00 2001 From: zelig Date: Fri, 9 Jan 2015 05:06:04 +0000 Subject: [PATCH] no need to call AddBlockHashes when receiving new block --- eth/protocol.go | 10 ---------- 1 file changed, 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) }