pub struct ProofOfWorkConsensus { /* private fields */ }
Expand description
Simple proof-of-work consensus
Implementations§
Trait Implementations§
Source§impl Consensus for ProofOfWorkConsensus
impl Consensus for ProofOfWorkConsensus
Source§fn initialize(&self) -> Result<()>
fn initialize(&self) -> Result<()>
Initialize the consensus mechanism
Source§fn has_consensus(&self) -> Result<bool>
fn has_consensus(&self) -> Result<bool>
Check if the current node has consensus
Auto Trait Implementations§
impl Freeze for ProofOfWorkConsensus
impl RefUnwindSafe for ProofOfWorkConsensus
impl Send for ProofOfWorkConsensus
impl Sync for ProofOfWorkConsensus
impl Unpin for ProofOfWorkConsensus
impl UnwindSafe for ProofOfWorkConsensus
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