Skip to main content

ProposerSelector

Trait ProposerSelector 

Source
pub trait ProposerSelector: Send + Sync {
    // Required method
    fn preferred_proposers(&self, max: usize) -> Option<AllowedProposers>;
}
Expand description

Trait to let the gRPC service name the validators a transaction should be submitted to, without depending on the transaction driver that tracks them.

Required Methods§

Source

fn preferred_proposers(&self, max: usize) -> Option<AllowedProposers>

Up to max validators this node would prefer to submit to, as committee indices for the current epoch. None when no preference can be formed, in which case the transaction is left unrestricted rather than pinned to an arbitrary set.

The returned indices are strictly increasing, as TransactionExpiration::Validity requires.

Implementors§