mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
Improve NOTFOUND comment
This commit is contained in:
parent
0c9de67f34
commit
218697b645
@ -1455,12 +1455,19 @@ void static ProcessGetData(CNode* pfrom, const CChainParams& chainparams, CConnm
|
|||||||
|
|
||||||
if (!vNotFound.empty()) {
|
if (!vNotFound.empty()) {
|
||||||
// Let the peer know that we didn't find what it asked for, so it doesn't
|
// 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
|
// have to wait around forever.
|
||||||
// about this message: it's needed when they are recursively walking the
|
// SPV clients care about this message: it's needed when they are
|
||||||
// dependencies of relevant unconfirmed transactions. SPV clients want to
|
// recursively walking the dependencies of relevant unconfirmed
|
||||||
// do that because they want to know about (and store and rebroadcast and
|
// transactions. SPV clients want to do that because they want to know
|
||||||
// risk analyze) the dependencies of transactions relevant to them, without
|
// about (and store and rebroadcast and risk analyze) the dependencies
|
||||||
// having to download the entire memory pool.
|
// 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));
|
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::NOTFOUND, vNotFound));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user