diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-06-11 11:32:11 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-06-20 10:49:26 -0400 |
commit | dddd9270f85bd2e71fd281a0c6b4053e02fce93c (patch) | |
tree | 34ce80a003c174d6c0b29de178b1a96faa33883a /src/net_processing.cpp | |
parent | 8a503a6c6dd419921373f45d7aa6f1787c9b8884 (diff) |
net: Document what happens to getdata of unknonw type
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index 0d9e314afd..4380e64a16 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -1540,6 +1540,11 @@ void static ProcessGetData(CNode* pfrom, const CChainParams& chainparams, CConnm } } + // Unknown types in the GetData stay in vRecvGetData and block any future + // message from this peer, see vRecvGetData check in ProcessMessages(). + // Depending on future p2p changes, we might either drop unknown getdata on + // the floor or disconnect the peer. + pfrom->vRecvGetData.erase(pfrom->vRecvGetData.begin(), it); if (!vNotFound.empty()) { @@ -3219,6 +3224,7 @@ bool PeerLogicValidation::ProcessMessages(CNode* pfrom, std::atomic<bool>& inter return false; // this maintains the order of responses + // and prevents vRecvGetData to grow unbounded if (!pfrom->vRecvGetData.empty()) return true; if (!pfrom->orphan_work_set.empty()) return true; |