[#TxRequestTracker-ReceivedInv] = xref:TxRequestTracker.adoc[TxRequestTracker]::ReceivedInv :relfileprefix: ../ :mrdocs: Adds a new CANDIDATE announcement. == Synopsis Declared in `<txrequest.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void ReceivedInv( xref:NodeId-08.adoc[NodeId] peer, xref:GenTxid.adoc[GenTxid] const& gtxid, bool preferred, std::chrono::microseconds reqtime); ---- == Description 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. == Parameters [cols="1,4"] |=== | 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. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#