diff options
author | Felix Lange <fjl@twurst.com> | 2015-03-04 19:03:43 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-03-04 19:27:24 +0800 |
commit | 7964f30dcbdde00b2960ef6e98320e0a0f9300e2 (patch) | |
tree | add3fbd54ec615135f3ecdac2917d22e77581d56 /p2p/server.go | |
parent | 21649100b1ed64c9bd73c547360dd6db9b5218fb (diff) | |
download | go-tangerine-7964f30dcbdde00b2960ef6e98320e0a0f9300e2.tar.gz go-tangerine-7964f30dcbdde00b2960ef6e98320e0a0f9300e2.tar.zst go-tangerine-7964f30dcbdde00b2960ef6e98320e0a0f9300e2.zip |
p2p: msg.Payload contains list data
With RLPx frames, the message code is contained in the
frame and is no longer part of the encoded data.
EncodeMsg, Msg.Decode have been updated to match.
Code that decodes RLP directly from Msg.Payload will need
to change.
Diffstat (limited to 'p2p/server.go')
-rw-r--r-- | p2p/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/p2p/server.go b/p2p/server.go index e53e832aa..67d5514b4 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -10,6 +10,7 @@ import ( "sync" "time" + "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/p2p/discover" "github.com/ethereum/go-ethereum/p2p/nat" @@ -135,7 +136,7 @@ func (srv *Server) SuggestPeer(n *discover.Node) { func (srv *Server) Broadcast(protocol string, code uint64, data ...interface{}) { var payload []byte if data != nil { - payload = encodePayload(data...) + payload = ethutil.Encode(data) } srv.lock.RLock() defer srv.lock.RUnlock() |