pub trait FeeRule {
type Error;
// Required method
fn fee_required<P: Parameters>(
&self,
params: &P,
target_height: BlockHeight,
transparent_input_sizes: impl IntoIterator<Item = InputSize>,
transparent_output_sizes: impl IntoIterator<Item = usize>,
sapling_input_count: usize,
sapling_output_count: usize,
orchard_action_count: usize,
ironwood_action_count: usize,
) -> Result<Zatoshis, Self::Error>;
}Expand description
A trait that represents the ability to compute the fees that must be paid by a transaction having a specified set of inputs and outputs.
Required Associated Types§
Required Methods§
Sourcefn fee_required<P: Parameters>(
&self,
params: &P,
target_height: BlockHeight,
transparent_input_sizes: impl IntoIterator<Item = InputSize>,
transparent_output_sizes: impl IntoIterator<Item = usize>,
sapling_input_count: usize,
sapling_output_count: usize,
orchard_action_count: usize,
ironwood_action_count: usize,
) -> Result<Zatoshis, Self::Error>
fn fee_required<P: Parameters>( &self, params: &P, target_height: BlockHeight, transparent_input_sizes: impl IntoIterator<Item = InputSize>, transparent_output_sizes: impl IntoIterator<Item = usize>, sapling_input_count: usize, sapling_output_count: usize, orchard_action_count: usize, ironwood_action_count: usize, ) -> Result<Zatoshis, Self::Error>
Computes the total fee required for a transaction given the provided inputs and outputs.
Implementations of this method should compute the fee amount given exactly the inputs and outputs specified, and should NOT compute speculative fees given any additional change outputs that may need to be created in order for inputs and outputs to balance.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".