mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-23 07:13:33 +02:00
[net processing] PushNodeVersion() takes a const Peer&
The peer object is not mutated by PushNodeVersion, so pass a const reference
This commit is contained in:
parent
21154ff927
commit
0bca5f2b46
@ -426,7 +426,7 @@ private:
|
|||||||
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||||
|
|
||||||
/** Send a version message to a peer */
|
/** Send a version message to a peer */
|
||||||
void PushNodeVersion(CNode& pnode, Peer& peer);
|
void PushNodeVersion(CNode& pnode, const Peer& peer);
|
||||||
|
|
||||||
/** Send a ping message every PING_INTERVAL or if requested via RPC. May
|
/** Send a ping message every PING_INTERVAL or if requested via RPC. May
|
||||||
* mark the peer to be disconnected if a ping has timed out.
|
* mark the peer to be disconnected if a ping has timed out.
|
||||||
@ -1158,7 +1158,7 @@ void PeerManagerImpl::FindNextBlocksToDownload(NodeId nodeid, unsigned int count
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void PeerManagerImpl::PushNodeVersion(CNode& pnode, Peer& peer)
|
void PeerManagerImpl::PushNodeVersion(CNode& pnode, const Peer& peer)
|
||||||
{
|
{
|
||||||
// Note that pnode->GetLocalServices() is a reflection of the local
|
// Note that pnode->GetLocalServices() is a reflection of the local
|
||||||
// services we were offering when the CNode object was created for this
|
// services we were offering when the CNode object was created for this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user