Skip to content

Commit 0bca5f2

Browse files
committed
[net processing] PushNodeVersion() takes a const Peer&
The peer object is not mutated by PushNodeVersion, so pass a const reference
1 parent 21154ff commit 0bca5f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ class PeerManagerImpl final : public PeerManager
426426
EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
427427

428428
/** Send a version message to a peer */
429-
void PushNodeVersion(CNode& pnode, Peer& peer);
429+
void PushNodeVersion(CNode& pnode, const Peer& peer);
430430

431431
/** Send a ping message every PING_INTERVAL or if requested via RPC. May
432432
* mark the peer to be disconnected if a ping has timed out.
@@ -1158,7 +1158,7 @@ void PeerManagerImpl::FindNextBlocksToDownload(NodeId nodeid, unsigned int count
11581158

11591159
} // namespace
11601160

1161-
void PeerManagerImpl::PushNodeVersion(CNode& pnode, Peer& peer)
1161+
void PeerManagerImpl::PushNodeVersion(CNode& pnode, const Peer& peer)
11621162
{
11631163
// Note that pnode->GetLocalServices() is a reflection of the local
11641164
// services we were offering when the CNode object was created for this

0 commit comments

Comments
 (0)