Trait themelio_nodeprot::TrustStore [−][src]
pub trait TrustStore {
fn set(&self, netid: NetID, trusted: TrustedHeight);
fn get(&self, netid: NetID) -> Option<TrustedHeight>;
}
Expand description
Standard interface for persisting a trusted block.
Required methods
fn set(&self, netid: NetID, trusted: TrustedHeight)
fn set(&self, netid: NetID, trusted: TrustedHeight)
Set a trusted block in persistent storage, overriding the current value only if this one has a higher block height.
fn get(&self, netid: NetID) -> Option<TrustedHeight>
fn get(&self, netid: NetID) -> Option<TrustedHeight>
Get the latest trusted block from persistent storage if one exists.