aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2019-04-22 12:17:20 -0400
committerSuhas Daftuar <sdaftuar@gmail.com>2019-04-26 09:31:29 -0400
commit218697b645b23249c16afa29b4ada20c1739c502 (patch)
treee68fbaf22cf0682a09b999a2702a3611784baf52 /src
parent0c9de67f343c0e740a7f488e85270d519a352119 (diff)
Improve NOTFOUND comment
Diffstat (limited to 'src')
-rw-r--r--src/net_processing.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 74e33189dc..f76e5d64a0 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -1455,12 +1455,19 @@ void static ProcessGetData(CNode* pfrom, const CChainParams& chainparams, CConnm
if (!vNotFound.empty()) {
// Let the peer know that we didn't find what it asked for, so it doesn't
- // have to wait around forever. Currently only SPV clients actually care
- // about this message: it's needed when they are recursively walking the
- // dependencies of relevant unconfirmed transactions. SPV clients want to
- // do that because they want to know about (and store and rebroadcast and
- // risk analyze) the dependencies of transactions relevant to them, without
- // having to download the entire memory pool.
+ // have to wait around forever.
+ // SPV clients care about this message: it's needed when they are
+ // recursively walking the dependencies of relevant unconfirmed
+ // transactions. SPV clients want to do that because they want to know
+ // about (and store and rebroadcast and risk analyze) the dependencies
+ // of transactions relevant to them, without having to download the
+ // entire memory pool.
+ // Also, other nodes can use these messages to automatically request a
+ // transaction from some other peer that annnounced it, and stop
+ // waiting for us to respond.
+ // In normal operation, we often send NOTFOUND messages for parents of
+ // transactions that we relay; if a peer is missing a parent, they may
+ // assume we have them and request the parents from us.
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::NOTFOUND, vNotFound));
}
}