Struct tendermint_machine::TendermintMachine
source · pub struct TendermintMachine<N: Network> { /* private fields */ }
Expand description
A machine executing the Tendermint protocol.
Implementations§
source§impl<N: Network + 'static> TendermintMachine<N>
impl<N: Network + 'static> TendermintMachine<N>
sourcepub async fn new(
db: N::Db,
network: N,
genesis: [u8; 32],
last_block: BlockNumber,
last_time: u64,
proposal: N::Block,
) -> TendermintHandle<N>
pub async fn new( db: N::Db, network: N, genesis: [u8; 32], last_block: BlockNumber, last_time: u64, proposal: N::Block, ) -> TendermintHandle<N>
Create a new Tendermint machine, from the specified point, with the specified block as the
one to propose next. This will return a channel to send messages from the gossip layer and
the machine itself. The machine should have run
called from an asynchronous task.
pub async fn run(self)
Auto Trait Implementations§
impl<N> Freeze for TendermintMachine<N>
impl<N> !RefUnwindSafe for TendermintMachine<N>
impl<N> Send for TendermintMachine<N>
impl<N> Sync for TendermintMachine<N>
impl<N> Unpin for TendermintMachine<N>where
<N as Network>::Db: Unpin,
N: Unpin,
<<N as Network>::SignatureScheme as SignatureScheme>::Signer: Unpin,
<N as Network>::SignatureScheme: Unpin,
<N as Network>::ValidatorId: Unpin,
<N as Network>::Block: Unpin,
<<N as Network>::Block as Block>::Id: Unpin,
<<N as Network>::SignatureScheme as SignatureScheme>::Signature: Unpin,
impl<N> !UnwindSafe for TendermintMachine<N>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more