Reverted back to messages

This commit is contained in:
obscuren 2014-02-02 01:39:06 +01:00
parent dfa778fed6
commit b70fe3a9be

View File

@ -169,7 +169,7 @@ func (s *Ethereum) InOutPeers() []*Peer {
return inboundPeers[:length] return inboundPeers[:length]
} }
func (s *Ethereum) Broadcast(msgType ethwire.MsgType, data interface{}) { func (s *Ethereum) Broadcast(msgType ethwire.MsgType, data []interface{}) {
msg := ethwire.NewMessage(msgType, data) msg := ethwire.NewMessage(msgType, data)
eachPeer(s.peers, func(p *Peer, e *list.Element) { eachPeer(s.peers, func(p *Peer, e *list.Element) {
p.QueueMessage(msg) p.QueueMessage(msg)
@ -237,12 +237,7 @@ func (s *Ethereum) Start() {
// Bind to addr and port // Bind to addr and port
ln, err := net.Listen("tcp", ":30303") ln, err := net.Listen("tcp", ":30303")
if err != nil { if err != nil {
// This is mainly for testing to create a "network" log.Println("Connection listening disabled. Acting as client")
//if ethutil.Config.Debug {
//log.Println("Connection listening disabled. Acting as client")
//} else {
log.Fatal(err)
//}
} else { } else {
s.Addr = ln.Addr() s.Addr = ln.Addr()
// Starting accepting connections // Starting accepting connections