diff options
author | John Newbery <john@johnnewbery.com> | 2022-03-29 15:54:13 +0100 |
---|---|---|
committer | John Newbery <john@johnnewbery.com> | 2022-03-29 15:54:16 +0100 |
commit | 0bca5f2b465616d7ac915ddcc1acd9a021e40abb (patch) | |
tree | 74b8041f78b9be58a524050614e255b266c496ae | |
parent | 21154ff9270e4bbae02d9012a4a73cce86a00334 (diff) |
[net processing] PushNodeVersion() takes a const Peer&
The peer object is not mutated by PushNodeVersion, so pass a const reference
-rw-r--r-- | src/net_processing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 195456bbf4..fb585937ee 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -426,7 +426,7 @@ private: EXCLUSIVE_LOCKS_REQUIRED(::cs_main); /** 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 * 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 -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 // services we were offering when the CNode object was created for this |