diff options
author | Felix Lange <fjl@twurst.com> | 2015-03-23 22:08:29 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-04-17 20:45:09 +0800 |
commit | 56a48101dc3dd96587915a5d7882f9d46ecc6ae9 (patch) | |
tree | 575920d621c24815f0b197f46ab32cba2735b99b /eth | |
parent | c35f4fd0bd93bcab01ba7704fc144514a2cc7a1b (diff) | |
download | go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.tar go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.tar.gz go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.tar.bz2 go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.tar.lz go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.tar.xz go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.tar.zst go-tangerine-56a48101dc3dd96587915a5d7882f9d46ecc6ae9.zip |
cmd/rlpdump, cmd/utils, eth, p2p, whisper: use rlp input limit
Diffstat (limited to 'eth')
-rw-r--r-- | eth/protocol.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/protocol.go b/eth/protocol.go index 1a19307db..6b566f31b 100644 --- a/eth/protocol.go +++ b/eth/protocol.go @@ -210,7 +210,7 @@ func (self *ethProtocol) handle() error { return p2p.Send(self.rw, BlockHashesMsg, hashes) case BlockHashesMsg: - msgStream := rlp.NewStream(msg.Payload) + msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) if _, err := msgStream.List(); err != nil { return err } @@ -231,7 +231,7 @@ func (self *ethProtocol) handle() error { self.blockPool.AddBlockHashes(iter, self.id) case GetBlocksMsg: - msgStream := rlp.NewStream(msg.Payload) + msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) if _, err := msgStream.List(); err != nil { return err } @@ -259,7 +259,7 @@ func (self *ethProtocol) handle() error { return p2p.Send(self.rw, BlocksMsg, blocks) case BlocksMsg: - msgStream := rlp.NewStream(msg.Payload) + msgStream := rlp.NewStream(msg.Payload, uint64(msg.Size)) if _, err := msgStream.List(); err != nil { return err } |