Avoid calling CAddrMan::Connected() on block-relay-only peer addresses

Connected() updates the time we serve in addr messages, so avoid leaking
block-relay-only peer connections by avoiding these calls.
This commit is contained in:
Suhas Daftuar
2020-10-24 03:16:04 -04:00
parent d67883d01e
commit daf5553126
5 changed files with 12 additions and 10 deletions

View File

@@ -58,7 +58,7 @@ public:
/** Initialize a peer by adding it to mapNodeState and pushing a message requesting its version */
void InitializeNode(CNode* pnode) override;
/** Handle removal of a peer by updating various state and removing it from mapNodeState */
void FinalizeNode(NodeId nodeid, bool& fUpdateConnectionTime) override;
void FinalizeNode(const CNode& node, bool& fUpdateConnectionTime) override;
/**
* Process protocol messages received from a given node
*