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(
network: N,
last_block: BlockNumber,
last_time: u64,
proposal: N::Block,
) -> TendermintHandle<N>
pub async fn new( network: N, 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>where
N: Freeze,
<<N as Network>::SignatureScheme as SignatureScheme>::Signer: Freeze,
<N as Network>::SignatureScheme: Freeze,
<N as Network>::Block: Freeze,
<N as Network>::ValidatorId: Freeze,
<<N as Network>::Block as Block>::Id: Freeze,
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: Unpin,
<<N as Network>::SignatureScheme as SignatureScheme>::Signer: Unpin,
<N as Network>::SignatureScheme: Unpin,
<N as Network>::Block: Unpin,
<N as Network>::ValidatorId: Unpin,
<<N as Network>::Block as Block>::Id: Unpin,
<<N as Network>::SignatureScheme as SignatureScheme>::Signature: Unpin,
impl<N> UnsafeUnpin for TendermintMachine<N>where
N: UnsafeUnpin,
<<N as Network>::SignatureScheme as SignatureScheme>::Signer: UnsafeUnpin,
<N as Network>::SignatureScheme: UnsafeUnpin,
<N as Network>::Block: UnsafeUnpin,
<N as Network>::ValidatorId: UnsafeUnpin,
<<N as Network>::Block as Block>::Id: UnsafeUnpin,
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