Set services to remote peer services for all peers.

Rather than only setting the services field for inbound peers, set it for
all peers.  This field referes to the remote peer's services regardless of
inbound or outbound.
This commit is contained in:
Dave Collins 2013-09-03 13:34:27 -05:00
parent 83407ade61
commit a69ba92006

View file

@ -178,12 +178,12 @@ func (p *peer) handleVersionMsg(msg *btcwire.MsgVersion) {
p.protocolVersion, p.conn.RemoteAddr()) p.protocolVersion, p.conn.RemoteAddr())
p.lastBlock = msg.LastBlock p.lastBlock = msg.LastBlock
// Inbound connections.
if p.inbound {
// Set the supported services for the peer to what the remote // Set the supported services for the peer to what the remote
// peer advertised. // peer advertised.
p.services = msg.Services p.services = msg.Services
// Inbound connections.
if p.inbound {
// Send version. // Send version.
err := p.pushVersionMsg() err := p.pushVersionMsg()
if err != nil { if err != nil {