node::TxDownloadManager::AddTxAnnouncement

Consider adding this tx hash to txrequest. Should be called whenever a new inv has been received. Also called internally when a transaction is missing parents so that we can request them. Returns true if this was a dropped inv (p2p_inv=true and we already have the tx), false otherwise.

Synopsis

Declared in <node/txdownloadman.h>

bool
AddTxAnnouncement(
    NodeId peer,
    GenTxid const& gtxid,
    std::chrono::microseconds now);

Return Value

True if the inv was dropped because we already have the tx, false otherwise.

Parameters

NameDescription
peerThe peer announcing the transaction.
gtxidThe announced transaction identifier.
nowThe current time, used to schedule request delays.