Commit 8b4ed8c5 authored by Maran's avatar Maran

Properly exchange peer capabilities between peers

parent 4eb3ad19
......@@ -122,6 +122,10 @@ func (s *Ethereum) TxPool() *ethchain.TxPool {
return s.txPool
}
func (s *Ethereum) ServerCaps() Caps {
return s.serverCaps
}
func (s *Ethereum) AddPeer(conn net.Conn) {
peer := NewPeer(conn, s, true)
......
......@@ -146,6 +146,7 @@ func NewPeer(conn net.Conn, ethereum *Ethereum, inbound bool) *Peer {
port: 30303,
pubkey: pubkey,
blocksRequested: 10,
caps: ethereum.ServerCaps(),
}
}
......@@ -573,7 +574,6 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
}
// Catch up with the connected peer
// p.CatchupWithPeer(p.ethereum.BlockChain().CurrentBlock.Hash())
p.SyncWithBlocks()
// Set the peer's caps
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment