pub struct SlotHashProof { /* private fields */ }Expand description
A proof for the state of the SlotHashes sysvar for a given slot.
Implementations§
Source§impl SlotHashProof
impl SlotHashProof
Sourcepub fn new(slot: Slot, slot_hashes_inclusion_proof: InclusionProof) -> Self
pub fn new(slot: Slot, slot_hashes_inclusion_proof: InclusionProof) -> Self
Creates a new proof for the state of the SlotHashes sysvar for a given slot.
Sourcepub fn verify(
&self,
slot: Slot,
bank_hash: Hash,
accounts_delta_hash: Hash,
) -> Result<(), SlotHashError>
pub fn verify( &self, slot: Slot, bank_hash: Hash, accounts_delta_hash: Hash, ) -> Result<(), SlotHashError>
Verifies that the SlotHashes sysvar contains bank_hash.
Sourcepub fn deserialize_account_data(&self) -> Result<SlotHashes, Arc<Error>>
pub fn deserialize_account_data(&self) -> Result<SlotHashes, Arc<Error>>
Attempts to deserialize the stored account data into a SlotHashes.
Trait Implementations§
Source§impl Clone for SlotHashProof
impl Clone for SlotHashProof
Source§fn clone(&self) -> SlotHashProof
fn clone(&self) -> SlotHashProof
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SlotHashProof
impl Debug for SlotHashProof
Source§impl<'de> Deserialize<'de> for SlotHashProof
impl<'de> Deserialize<'de> for SlotHashProof
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SlotHashProof
impl PartialEq for SlotHashProof
Source§impl Serialize for SlotHashProof
impl Serialize for SlotHashProof
impl Eq for SlotHashProof
impl StructuralPartialEq for SlotHashProof
Auto Trait Implementations§
impl Freeze for SlotHashProof
impl RefUnwindSafe for SlotHashProof
impl Send for SlotHashProof
impl Sync for SlotHashProof
impl Unpin for SlotHashProof
impl UnwindSafe for SlotHashProof
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more