TxRequestTracker::RequestedTx

Marks a transaction as requested, with a specified expiry.

Synopsis

Declared in <txrequest.h>

void
RequestedTx(
    NodeId peer,
    uint256 const& txhash,
    std::chrono::microseconds expiry);

Description

If no CANDIDATE announcement for the provided peer and txhash exists, this call has no effect. Otherwise:

  • That announcement is converted to REQUESTED.

  • If any other REQUESTED announcement for the same txhash already existed, it means an unexpected request was made (GetRequestable will never advise doing so). In this case it is converted to COMPLETED, as we're no longer waiting for a response to it.

Parameters

NameDescription
peerPeer the transaction is requested from.
txhashTransaction hash being requested.
expiryTime at which the pending request times out.