This PR adds rename the reject_reason
of our implementation of BIP125 rule 4 and adds missing functional test coverage. Note, insufficient fee
is already the reject_reason
of few others PreChecks
replacement checks and as such might be confusing.
The replacement transaction must also pay for its own bandwidth at or above the rate set by the node’s minimum relay fee setting. For example, if the minimum relay fee is 1 satoshi/byte and the replacement transaction is 500 bytes total, then the replacement must pay a fee at least 500 satoshis higher than the sum of the originals.
0 // Finally in addition to paying more fees than the conflicts the
1 // new transaction must pay for its own bandwidth.
2 CAmount nDeltaFees = nModifiedFees - nConflictingFees;
3 if (nDeltaFees < ::incrementalRelayFee.GetFee(nSize))
4 {
5 return state.Invalid(TxValidationResult::TX_MEMPOOL_POLICY, "insufficient fee",
6 strprintf("rejecting replacement %s, not enough additional fees to relay; %s < %s",
7 hash.ToString(),
8 FormatMoney(nDeltaFees),
9 FormatMoney(::incrementalRelayFee.GetFee(nSize))));
10 }