Skip to main content

FeeModel

Trait FeeModel 

Source
pub trait FeeModel {
    // Required method
    fn compute_fee(&self, tx: &Transaction) -> Result<u64, TransactionError>;
}
Expand description

Trait for computing transaction fees.

Implementations estimate the fee required for a transaction based on its size or other properties. The standard implementation is SatoshisPerKilobyte.

Required Methods§

Source

fn compute_fee(&self, tx: &Transaction) -> Result<u64, TransactionError>

Compute the fee in satoshis for the given transaction.

Implementors§