node::TxDownloadManager::ReceivedTx

Marks a tx as ReceivedResponse in txrequest and checks whether AlreadyHaveTx. Return a bool indicating whether this tx should be validated. If false, optionally, a PackageToValidate.

Synopsis

Declared in <node/txdownloadman.h>

std::pair<bool, std::optional<PackageToValidate>>
ReceivedTx(
    NodeId nodeid,
    CTransactionRef const& ptx);

Return Value

A pair whose bool says whether to validate the tx, with an optional package to validate instead.

Parameters

NameDescription
nodeidThe peer that provided the transaction.
ptxThe received transaction.