peer: Remove unused version sent field.
This removes the field that tracks whether the version has been sent since it is no longer used after the version negotiation was separated from the main read and write code.
This commit is contained in:
parent
1ae306021e
commit
8efd6b15ed
1 changed files with 1 additions and 9 deletions
10
peer/peer.go
10
peer/peer.go
|
@ -405,7 +405,6 @@ type Peer struct {
|
||||||
advertisedProtoVer uint32 // protocol version advertised by remote
|
advertisedProtoVer uint32 // protocol version advertised by remote
|
||||||
protocolVersion uint32 // negotiated protocol version
|
protocolVersion uint32 // negotiated protocol version
|
||||||
sendHeadersPreferred bool // peer sent a sendheaders message
|
sendHeadersPreferred bool // peer sent a sendheaders message
|
||||||
versionSent bool
|
|
||||||
verAckReceived bool
|
verAckReceived bool
|
||||||
|
|
||||||
knownInventory *mruInventoryMap
|
knownInventory *mruInventoryMap
|
||||||
|
@ -2017,14 +2016,7 @@ func (p *Peer) writeLocalVersionMsg() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := p.writeMessage(localVerMsg); err != nil {
|
return p.writeMessage(localVerMsg)
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
p.flagsMtx.Lock()
|
|
||||||
p.versionSent = true
|
|
||||||
p.flagsMtx.Unlock()
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// negotiateInboundProtocol waits to receive a version message from the peer
|
// negotiateInboundProtocol waits to receive a version message from the peer
|
||||||
|
|
Loading…
Reference in a new issue