pub struct CumulativeRctOutsCache {
pub start_height: usize,
pub cumulative_rct_outs: Vec<u64>,
}Expand description
A cache of the cumulative RCT output count per block.
Fields§
§start_height: usizeThe HF v4 activation height.
cumulative_rct_outs: Vec<u64>The cumulative RCT output count for blocks start_height..chain_height.
Implementations§
Source§impl CumulativeRctOutsCache
impl CumulativeRctOutsCache
Sourcepub async fn init_from_chain_height<D: Database + Clone>(
chain_height: usize,
hard_fork_cfg: HardForkConfig,
database: D,
) -> Result<Self, ContextCacheError>
pub async fn init_from_chain_height<D: Database + Clone>( chain_height: usize, hard_fork_cfg: HardForkConfig, database: D, ) -> Result<Self, ContextCacheError>
Initialize the RCT outs cache from the specified chain height.
Sourcepub fn new_block(&mut self, height: usize, numb_rct_outputs: usize)
pub fn new_block(&mut self, height: usize, numb_rct_outputs: usize)
Add a new block to the RCT outs cache.
Sourcepub fn pop_blocks_main_chain(&mut self, numb_blocks: usize)
pub fn pop_blocks_main_chain(&mut self, numb_blocks: usize)
Pop some blocks from the top of the cache.
Trait Implementations§
Source§impl Clone for CumulativeRctOutsCache
impl Clone for CumulativeRctOutsCache
Source§fn clone(&self) -> CumulativeRctOutsCache
fn clone(&self) -> CumulativeRctOutsCache
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CumulativeRctOutsCache
impl Debug for CumulativeRctOutsCache
impl Eq for CumulativeRctOutsCache
Source§impl PartialEq for CumulativeRctOutsCache
impl PartialEq for CumulativeRctOutsCache
impl StructuralPartialEq for CumulativeRctOutsCache
Auto Trait Implementations§
impl Freeze for CumulativeRctOutsCache
impl RefUnwindSafe for CumulativeRctOutsCache
impl Send for CumulativeRctOutsCache
impl Sync for CumulativeRctOutsCache
impl Unpin for CumulativeRctOutsCache
impl UnsafeUnpin for CumulativeRctOutsCache
impl UnwindSafe for CumulativeRctOutsCache
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
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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
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: 32 bytes