peer: Rename variable for consistency.

This commit is contained in:
Jonathan Gillham 2015-12-14 21:52:06 -08:00
parent 542844832e
commit 4d40a2110a

View file

@ -742,7 +742,7 @@ func (p *Peer) pushVersionMsg() error {
}
}
theirNa := p.na
theirNA := p.na
// If we are behind a proxy and the connection comes from the proxy then
// we return an unroutable address as their address. This is to prevent
@ -751,7 +751,7 @@ func (p *Peer) pushVersionMsg() error {
proxyaddress, _, err := net.SplitHostPort(p.cfg.Proxy)
// invalid proxy means poorly configured, be on the safe side.
if err != nil || p.na.IP.String() == proxyaddress {
theirNa = &wire.NetAddress{
theirNA = &wire.NetAddress{
Timestamp: time.Now(),
IP: net.IP([]byte{0, 0, 0, 0}),
}
@ -776,7 +776,7 @@ func (p *Peer) pushVersionMsg() error {
sentNonces.Add(nonce)
// Version message.
msg := wire.NewMsgVersion(ourNA, theirNa, nonce, int32(blockNum))
msg := wire.NewMsgVersion(ourNA, theirNA, nonce, int32(blockNum))
msg.AddUserAgent(p.cfg.UserAgentName, p.cfg.UserAgentVersion)
// XXX: bitcoind appears to always enable the full node services flag