Adds a new CANDIDATE announcement.
Declared in <txrequest.h>
void
ReceivedInv(
NodeId peer,
GenTxid const& gtxid,
bool preferred,
std::chrono::microseconds reqtime);
Does nothing if one already exists for that (txhash, peer) combination (whether it's CANDIDATE, REQUESTED, or COMPLETED). Note that the txid/wtxid property is ignored for determining uniqueness, so if an announcement is added for a wtxid H, while one for txid H from the same peer already exists, it will be ignored. This is harmless as the txhashes being equal implies it is a non-segwit transaction, so it doesn't matter how it is fetched. The new announcement is given the specified preferred and reqtime values, and takes its is_wtxid from the specified gtxid.
| Name | Description |
|---|---|
| peer | Peer that announced the transaction. |
| gtxid | Announced txid or wtxid, which also carries the is_wtxid flag. |
| preferred | Whether the announcement comes from a preferred peer. |
| reqtime | Earliest time the transaction may be requested from this peer. |