pub trait Proposer<B: BlockT> {
type Error: From<Error> + Send + Sync + Error + 'static;
type Proposal: Future<Output = Result<Proposal<B>, Self::Error>> + Send + Unpin + 'static;
// Required method
fn propose(self, args: ProposeArgs<B>) -> Self::Proposal;
}Expand description
Logic for a proposer.
This will encapsulate creation and evaluation of proposals at a specific block.
Proposers are generic over bits of “consensus data” which are engine-specific.
Required Associated Types§
Required Methods§
Sourcefn propose(self, args: ProposeArgs<B>) -> Self::Proposal
fn propose(self, args: ProposeArgs<B>) -> Self::Proposal
Create a proposal.
Takes a ProposeArgs struct containing all the necessary parameters for block production
including inherent data, digests, duration limits, storage proof recorder, and extensions.