pub struct PersistentEvidenceStore { /* private fields */ }Expand description
Persistent evidence store backed by vsdb.
Proofs survive node restarts. Uses a MapxOrd<u64, EquivocationProof> for
the proof list (keyed by auto-increment ID) and a MapxOrd<u64, u8> as a
committed-set (keyed by a hash of (view, validator)).
Implementations§
Trait Implementations§
Source§impl EvidenceStore for PersistentEvidenceStore
impl EvidenceStore for PersistentEvidenceStore
Source§fn put_evidence(&mut self, proof: EquivocationProof)
fn put_evidence(&mut self, proof: EquivocationProof)
Persist a new equivocation proof.
Source§fn get_pending(&self) -> Vec<EquivocationProof>
fn get_pending(&self) -> Vec<EquivocationProof>
Return all evidence that has not yet been marked as committed.
Source§fn mark_committed(&mut self, view: ViewNumber, validator: ValidatorId)
fn mark_committed(&mut self, view: ViewNumber, validator: ValidatorId)
Mark evidence for the given
(view, validator) as committed
(i.e. included in a finalized block).Source§fn all(&self) -> Vec<EquivocationProof>
fn all(&self) -> Vec<EquivocationProof>
Return every stored proof (committed or not).
Auto Trait Implementations§
impl !Freeze for PersistentEvidenceStore
impl RefUnwindSafe for PersistentEvidenceStore
impl Send for PersistentEvidenceStore
impl Sync for PersistentEvidenceStore
impl Unpin for PersistentEvidenceStore
impl UnsafeUnpin for PersistentEvidenceStore
impl UnwindSafe for PersistentEvidenceStore
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