aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethereum.go')
-rw-r--r--ethereum.go5
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)
})
}