aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-06-04 23:46:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-06-08 23:44:02 +0800
commit6f415b96b3b8581e810a8f40f596d2d213681e54 (patch)
tree026b991a4fd703fe83c3faf544ab8156b59856ee /eth/peer.go
parentc6faa18ec9630066683548ed410e364555fd838d (diff)
downloaddexon-6f415b96b3b8581e810a8f40f596d2d213681e54.tar.gz
dexon-6f415b96b3b8581e810a8f40f596d2d213681e54.tar.zst
dexon-6f415b96b3b8581e810a8f40f596d2d213681e54.zip
eth: implement the NewBlockHashes protocol proposal
Diffstat (limited to 'eth/peer.go')
-rw-r--r--eth/peer.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/eth/peer.go b/eth/peer.go
index bb6a20349..1146ebde3 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -88,6 +88,10 @@ func (p *peer) sendBlocks(blocks []*types.Block) error {
return p2p.Send(p.rw, BlocksMsg, blocks)
}
+func (p *peer) sendNewBlockHashes(hashes []common.Hash) error {
+ return p2p.Send(p.rw, NewBlockHashesMsg, hashes)
+}
+
func (p *peer) sendNewBlock(block *types.Block) error {
p.blockHashes.Add(block.Hash())