diff options
author | obscuren <geffobscura@gmail.com> | 2014-01-24 05:32:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-01-24 05:32:50 +0800 |
commit | 233f5200ef77ee77b4d33b5ff277d0e524b1fb4d (patch) | |
tree | 04ef6bfad717acdd7b8db987ae8fc37cf3e7d041 /ethereum.go | |
parent | 878e796c0adaa608a3e5feacf89a6766b347c9c8 (diff) | |
download | dexon-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.gz dexon-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.tar.zst dexon-233f5200ef77ee77b4d33b5ff277d0e524b1fb4d.zip |
Data send over the wire shouldn't be RLPed more then once
Diffstat (limited to 'ethereum.go')
-rw-r--r-- | ethereum.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ethereum.go b/ethereum.go index b1b675c88..db66c3ce7 100644 --- a/ethereum.go +++ b/ethereum.go @@ -122,9 +122,10 @@ func (s *Ethereum) InboundPeers() []*Peer { return inboundPeers[:length] } -func (s *Ethereum) Broadcast(msgType ethwire.MsgType, data []byte) { +func (s *Ethereum) Broadcast(msgType ethwire.MsgType, data interface{}) { + msg := ethwire.NewMessage(msgType, data) eachPeer(s.peers, func(p *Peer, e *list.Element) { - p.QueueMessage(ethwire.NewMessage(msgType, data)) + p.QueueMessage(msg) }) } |