aboutsummaryrefslogtreecommitdiffstats
path: root/eth/peer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2015-09-01 01:21:02 +0800
committerPéter Szilágyi <peterke@gmail.com>2015-09-11 22:42:25 +0800
commit2b339cbbd8bb475d2195d54a71dcced700003430 (patch)
tree7520c67d5bb5c66fe2430394a72f83d052bbe2b7 /eth/peer.go
parent4e075e401354b4ee068cf78b1f283763fe927245 (diff)
downloadgo-tangerine-2b339cbbd8bb475d2195d54a71dcced700003430.tar.gz
go-tangerine-2b339cbbd8bb475d2195d54a71dcced700003430.tar.zst
go-tangerine-2b339cbbd8bb475d2195d54a71dcced700003430.zip
core, eth: split the db blocks into headers and bodies
Diffstat (limited to 'eth/peer.go')
-rw-r--r--eth/peer.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/eth/peer.go b/eth/peer.go
index 8d7c48885..f1ddd9726 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -184,6 +184,12 @@ func (p *peer) SendBlockBodies(bodies []*blockBody) error {
return p2p.Send(p.rw, BlockBodiesMsg, blockBodiesData(bodies))
}
+// SendBlockBodiesRLP sends a batch of block contents to the remote peer from
+// an already RLP encoded format.
+func (p *peer) SendBlockBodiesRLP(bodies []*blockBodyRLP) error {
+ return p2p.Send(p.rw, BlockBodiesMsg, blockBodiesRLPData(bodies))
+}
+
// SendNodeData sends a batch of arbitrary internal data, corresponding to the
// hashes requested.
func (p *peer) SendNodeData(data [][]byte) error {