From 2b339cbbd8bb475d2195d54a71dcced700003430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 31 Aug 2015 20:21:02 +0300 Subject: core, eth: split the db blocks into headers and bodies --- eth/peer.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'eth/peer.go') 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 { -- cgit v1.2.3 From cdc2662c4098d68a7b450b9b9ff2688acbffcee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Mon, 7 Sep 2015 20:43:01 +0300 Subject: core: split out TD from database and all internals --- eth/peer.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'eth/peer.go') diff --git a/eth/peer.go b/eth/peer.go index f1ddd9726..603b49b88 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -28,6 +28,7 @@ import ( "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" "github.com/ethereum/go-ethereum/p2p" + "github.com/ethereum/go-ethereum/rlp" "gopkg.in/fatih/set.v0" ) @@ -186,8 +187,8 @@ func (p *peer) SendBlockBodies(bodies []*blockBody) error { // 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)) +func (p *peer) SendBlockBodiesRLP(bodies []rlp.RawValue) error { + return p2p.Send(p.rw, BlockBodiesMsg, bodies) } // SendNodeData sends a batch of arbitrary internal data, corresponding to the -- cgit v1.2.3