Function bitcoin_rbf::pays_forrbf

source ·
pub fn pays_forrbf(
    original_fees: Amount,
    replacement_fees: Amount,
    replacement_vsize: usize,
    relay_fee: FeeRate,
    txid: &u256
) -> Option<String>
Expand description

| Enforce BIP125 Rule #3 “The replacement | transaction pays an absolute fee of | at least the sum paid by the original | transactions.” Enforce BIP125 Rule | #4 “The replacement transaction must | also pay for its own bandwidth at or above | the rate set by the node’s minimum relay | fee setting.” | | ———– | @param[in] original_fees | | Total modified fees of original transaction(s). | ––––– | @param[in] replacement_fees | | Total modified fees of replacement | transaction(s). | ––––– | @param[in] replacement_vsize | | Total virtual size of replacement transaction(s). | ––––– | @param[in] relay_fee | | The node’s minimum feerate for transaction | relay. | ––––– | @param[in] txid | | Transaction ID, included in the error | message if violation occurs. | | ———– | @return | | error string if fees are insufficient, | otherwise std::nullopt. |