diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-09 19:07:46 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-06-09 19:07:46 +0800 |
commit | 05cae69d7295a924a4d2aeb49d23869047451e08 (patch) | |
tree | a6193274c083d8049d55f31b608872c62e0ca233 /eth/peer.go | |
parent | 087949227c3b10c2ae45cb1a54a6de1f4f5d6600 (diff) | |
parent | 8216bb901c9fbdcde427cc42ca7e82ec3ee2e8e7 (diff) | |
download | go-tangerine-05cae69d7295a924a4d2aeb49d23869047451e08.tar.gz go-tangerine-05cae69d7295a924a4d2aeb49d23869047451e08.tar.zst go-tangerine-05cae69d7295a924a4d2aeb49d23869047451e08.zip |
Merge pull request #1188 from karalabe/newblockhashes-proposal
eth: implement the NewBlockHashes protocol proposal
Diffstat (limited to 'eth/peer.go')
-rw-r--r-- | eth/peer.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/eth/peer.go b/eth/peer.go index b2fa20ebb..cf2c58ec9 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -88,6 +88,13 @@ func (p *peer) sendBlocks(blocks []*types.Block) error { return p2p.Send(p.rw, BlocksMsg, blocks) } +func (p *peer) sendNewBlockHashes(hashes []common.Hash) error { + for _, hash := range hashes { + p.blockHashes.Add(hash) + } + return p2p.Send(p.rw, NewBlockHashesMsg, hashes) +} + func (p *peer) sendNewBlock(block *types.Block) error { p.blockHashes.Add(block.Hash()) |