reth::transaction_pool

Function fee_delta

pub fn fee_delta(max_tx_fee: u128, current_fee: u128) -> i64
Expand description

The blob step function, attempting to compute the delta given the max_tx_fee, and current_fee.

The max_tx_fee is the maximum fee that the transaction is willing to pay, this would be the priority fee for the EIP1559 component of transaction fees, and the blob fee cap for the blob component of transaction fees.

The current_fee is the current value of the fee, this would be the base fee for the EIP1559 component, and the blob fee (computed from the current head) for the blob component.

This is supposed to get the number of fee jumps required to get from the current fee to the fee cap, or where the transaction would not be executable any more.

A positive value means that the transaction will remain executable unless the current fee increases.

A negative value means that the transaction is currently not executable, and requires the current fee to decrease by some number of jumps before the max fee is greater than the current fee.