diff options
author | Felix Lange <fjl@twurst.com> | 2015-01-06 18:35:09 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-01-06 19:23:38 +0800 |
commit | eb0e7b1b8120852a1d56aa0ebd3a98e652965635 (patch) | |
tree | 9e87afc204d178d89ed24cc43afcc3da6b252a49 /eth/protocol_test.go | |
parent | 36e1e5f15142b37801844a072eb46ea67fbc8868 (diff) | |
download | go-tangerine-eb0e7b1b8120852a1d56aa0ebd3a98e652965635.tar.gz go-tangerine-eb0e7b1b8120852a1d56aa0ebd3a98e652965635.tar.zst go-tangerine-eb0e7b1b8120852a1d56aa0ebd3a98e652965635.zip |
eth, p2p: remove EncodeMsg from p2p.MsgWriter
...and make it a top-level function instead.
The original idea behind having EncodeMsg in the interface was that
implementations might be able to encode RLP data to their underlying
writer directly instead of buffering the encoded data. The encoder
will buffer anyway, so that doesn't matter anymore.
Given the recent problems with EncodeMsg (copy-pasted implementation
bug) I'd rather implement once, correctly.
Diffstat (limited to 'eth/protocol_test.go')
-rw-r--r-- | eth/protocol_test.go | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/eth/protocol_test.go b/eth/protocol_test.go index ab2aa289f..224b59abd 100644 --- a/eth/protocol_test.go +++ b/eth/protocol_test.go @@ -41,10 +41,6 @@ func (self *testMsgReadWriter) WriteMsg(msg p2p.Msg) error { return nil } -func (self *testMsgReadWriter) EncodeMsg(code uint64, data ...interface{}) error { - return self.WriteMsg(p2p.NewMsg(code, data...)) -} - func (self *testMsgReadWriter) ReadMsg() (p2p.Msg, error) { msg, ok := <-self.in if !ok { |