InPoolTransaction

Trait InPoolTransaction 

Source
pub trait InPoolTransaction {
    type Transaction;
    type Hash;

    // Required methods
    fn data(&self) -> &Self::Transaction;
    fn hash(&self) -> &Self::Hash;
    fn priority(&self) -> &u64;
    fn longevity(&self) -> &u64;
    fn requires(&self) -> &[Vec<u8>];
    fn provides(&self) -> &[Vec<u8>];
    fn is_propagable(&self) -> bool;
}
Expand description

In-pool transaction interface.

The pool is container of transactions that are implementing this trait. See sp_runtime::ValidTransaction for details about every field.

Required Associated Types§

Source

type Transaction

Transaction type.

Source

type Hash

Transaction hash type.

Required Methods§

Source

fn data(&self) -> &Self::Transaction

Get the reference to the transaction data.

Source

fn hash(&self) -> &Self::Hash

Get hash of the transaction.

Source

fn priority(&self) -> &u64

Get priority of the transaction.

Source

fn longevity(&self) -> &u64

Get longevity of the transaction.

Source

fn requires(&self) -> &[Vec<u8>]

Get transaction dependencies.

Source

fn provides(&self) -> &[Vec<u8>]

Get tags that transaction provides.

Source

fn is_propagable(&self) -> bool

Return a flag indicating if the transaction should be propagated to other peers.

Implementations on Foreign Types§

Source§

impl<Hash, Extrinsic> InPoolTransaction for Transaction<Hash, Extrinsic>

Source§

type Transaction = Extrinsic

Source§

type Hash = Hash

Source§

fn data(&self) -> &Extrinsic

Source§

fn hash(&self) -> &Hash

Source§

fn priority(&self) -> &u64

Source§

fn longevity(&self) -> &u64

Source§

fn requires(&self) -> &[Vec<u8>]

Source§

fn provides(&self) -> &[Vec<u8>]

Source§

fn is_propagable(&self) -> bool

Implementors§