PaysForRBF

The replacement transaction must pay more fees than the original transactions. The additional fees must pay for the replacement's bandwidth at or above the incremental relay feerate.

Synopsis

Declared in <policy/rbf.h>

std::optional<std::string>
PaysForRBF(
    CAmount original_fees,
    CAmount replacement_fees,
    size_t replacement_vsize,
    CFeeRate relay_fee,
    Txid const& txid);

Return Value

error string if fees are insufficient, otherwise std::nullopt.

Parameters

NameDescription
original_fees [in]Total modified fees of original transaction(s).
replacement_fees [in]Total modified fees of replacement transaction(s).
replacement_vsize [in]Total virtual size of replacement transaction(s).
relay_fee [in]The node's minimum feerate for transaction relay.
txid [in]Transaction ID, included in the error message if violation occurs.