Trait scabbard::store::CommitHashStore [−][src]
pub trait CommitHashStore: Sync + Send {
fn get_current_commit_hash(
&self
) -> Result<Option<String>, CommitHashStoreError>;
fn set_current_commit_hash(
&self,
commit_hash: &str
) -> Result<(), CommitHashStoreError>;
fn clone_boxed(&self) -> Box<dyn CommitHashStore>;
}
Expand description
A store for the current commit hash value.
The commit hash, for Scabbard’s purposes is the current state root hash of the Merkle-Radix tree after transactions have been applied.
Required methods
fn get_current_commit_hash(
&self
) -> Result<Option<String>, CommitHashStoreError>
fn get_current_commit_hash(
&self
) -> Result<Option<String>, CommitHashStoreError>
Returns the current commit hash for the instance
fn set_current_commit_hash(
&self,
commit_hash: &str
) -> Result<(), CommitHashStoreError>
fn set_current_commit_hash(
&self,
commit_hash: &str
) -> Result<(), CommitHashStoreError>
Sets the current commit hash value.
The commit hash, for Scabbard’s purposes is the current state root hash of the Merkle-Radix tree after transactions have been applied.
Arguments
current_commit_hash
- the new “current” commit hash.