Skip to content

Commit 218697b

Browse files
committed
Improve NOTFOUND comment
1 parent 0c9de67 commit 218697b

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/net_processing.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,12 +1455,19 @@ void static ProcessGetData(CNode* pfrom, const CChainParams& chainparams, CConnm
14551455

14561456
if (!vNotFound.empty()) {
14571457
// Let the peer know that we didn't find what it asked for, so it doesn't
1458-
// have to wait around forever. Currently only SPV clients actually care
1459-
// about this message: it's needed when they are recursively walking the
1460-
// dependencies of relevant unconfirmed transactions. SPV clients want to
1461-
// do that because they want to know about (and store and rebroadcast and
1462-
// risk analyze) the dependencies of transactions relevant to them, without
1463-
// having to download the entire memory pool.
1458+
// have to wait around forever.
1459+
// SPV clients care about this message: it's needed when they are
1460+
// recursively walking the dependencies of relevant unconfirmed
1461+
// transactions. SPV clients want to do that because they want to know
1462+
// about (and store and rebroadcast and risk analyze) the dependencies
1463+
// of transactions relevant to them, without having to download the
1464+
// entire memory pool.
1465+
// Also, other nodes can use these messages to automatically request a
1466+
// transaction from some other peer that annnounced it, and stop
1467+
// waiting for us to respond.
1468+
// In normal operation, we often send NOTFOUND messages for parents of
1469+
// transactions that we relay; if a peer is missing a parent, they may
1470+
// assume we have them and request the parents from us.
14641471
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::NOTFOUND, vNotFound));
14651472
}
14661473
}

0 commit comments

Comments
 (0)