aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.h
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2020-09-24 10:11:30 +0100
committerJohn Newbery <john@johnnewbery.com>2020-12-07 11:59:24 +0000
commit3025ca9e7743d9b96c22e9c6ed7ef051dcea7e54 (patch)
tree13d7abac95c5cb177fbcbb888ee2e19ac9781648 /src/net_processing.h
parenta20ab22786466fe5164b53e62de9d23a4062fbca (diff)
downloadbitcoin-3025ca9e7743d9b96c22e9c6ed7ef051dcea7e54.tar.xz
[net processing] Add RemovePeer()
This allows us to avoid repeated locking in FinalizeNode()
Diffstat (limited to 'src/net_processing.h')
-rw-r--r--src/net_processing.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net_processing.h b/src/net_processing.h
index 6076e62732..c179b89ebe 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -143,6 +143,10 @@ private:
* May return an empty shared_ptr if the Peer object can't be found. */
PeerRef GetPeerRef(NodeId id) const;
+ /** Get a shared pointer to the Peer object and remove it from m_peer_map.
+ * May return an empty shared_ptr if the Peer object can't be found. */
+ PeerRef RemovePeer(NodeId id);
+
/**
* Potentially mark a node discouraged based on the contents of a BlockValidationState object
*