pub enum CachedVerificationState {
NotVerified,
OnlySemantic(HardFork),
ValidAtHashAndHF {
block_hash: [u8; 32],
hf: HardFork,
},
ValidAtHashAndHFWithTimeBasedLock {
block_hash: [u8; 32],
hf: HardFork,
time_lock: Timelock,
},
}Expand description
Represents if a transaction has been fully validated and under what conditions the transaction is valid in the future.
Variants§
NotVerified
The transaction has not been validated.
OnlySemantic(HardFork)
The transaction was only validated semantically.
ValidAtHashAndHF
The transaction is valid* if the block represented by this hash is in the blockchain and the HardFork
is the same.
*V1 transactions require checks on their ring-length even if this hash is in the blockchain.
Fields
ValidAtHashAndHFWithTimeBasedLock
The transaction is valid* if the block represented by this hash is in the blockchain and this given time lock is unlocked. The time lock here will represent the youngest used time based lock (If the transaction uses any time based time locks). This is because time locks are not monotonic so unlocked outputs could become re-locked.
*V1 transactions require checks on their ring-length even if this hash is in the blockchain.
Implementations§
Source§impl CachedVerificationState
impl CachedVerificationState
Sourcepub const fn verified_at_block_hash(&self) -> Option<[u8; 32]>
pub const fn verified_at_block_hash(&self) -> Option<[u8; 32]>
Returns the block hash this is valid for if in state CachedVerificationState::ValidAtHashAndHF or CachedVerificationState::ValidAtHashAndHFWithTimeBasedLock.
Trait Implementations§
Source§impl Clone for CachedVerificationState
impl Clone for CachedVerificationState
Source§fn clone(&self) -> CachedVerificationState
fn clone(&self) -> CachedVerificationState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CachedVerificationState
Source§impl Debug for CachedVerificationState
impl Debug for CachedVerificationState
impl Eq for CachedVerificationState
Source§impl PartialEq for CachedVerificationState
impl PartialEq for CachedVerificationState
impl StructuralPartialEq for CachedVerificationState
Auto Trait Implementations§
impl Freeze for CachedVerificationState
impl RefUnwindSafe for CachedVerificationState
impl Send for CachedVerificationState
impl Sync for CachedVerificationState
impl Unpin for CachedVerificationState
impl UnsafeUnpin for CachedVerificationState
impl UnwindSafe for CachedVerificationState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes
Size for each variant:
NotVerified: 0 bytesOnlySemantic: 9 bytesValidAtHashAndHF: 41 bytesValidAtHashAndHFWithTimeBasedLock: 56 bytes