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:
parent
83407ade61
commit
a69ba92006
1 changed files with 4 additions and 4 deletions
4
peer.go
4
peer.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue