Trait Validator

Source
pub trait Validator {
    // Required method
    fn order_transactions<R: Rng>(
        &mut self,
        rng: &mut R,
        transactions: Vec<Transaction>,
    ) -> Vec<Transaction>;
}
Expand description

Trait for a block validator

Validators are (currently) responsible for the ordering of transactions in the next block during a simulation.

Required Methods§

Source

fn order_transactions<R: Rng>( &mut self, rng: &mut R, transactions: Vec<Transaction>, ) -> Vec<Transaction>

Sort transaction queue

Sort a vector of transactions for processing in the next simulated block.

§Arguments
  • rng - Random generator.
  • transactions Vector submitted transactions.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§