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
8
peer.go
8
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
|
||||||
|
|
||||||
|
// Set the supported services for the peer to what the remote
|
||||||
|
// peer advertised.
|
||||||
|
p.services = msg.Services
|
||||||
|
|
||||||
// Inbound connections.
|
// Inbound connections.
|
||||||
if p.inbound {
|
if p.inbound {
|
||||||
// Set the supported services for the peer to what the remote
|
|
||||||
// peer advertised.
|
|
||||||
p.services = msg.Services
|
|
||||||
|
|
||||||
// Send version.
|
// Send version.
|
||||||
err := p.pushVersionMsg()
|
err := p.pushVersionMsg()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue