pub struct BurnDatastore { /* private fields */ }

Implementations§

source§

impl BurnDatastore

source

pub fn new(constants: StacksConstants) -> BurnDatastore

source

pub fn advance_chain_tip(&mut self, count: u32)

Trait Implementations§

source§

impl BurnStateDB for BurnDatastore

source§

fn get_burn_block_height(&self, sortition_id: &SortitionId) -> Option<u32>

Returns the burnchain block height for the sortition_id is associated with.

source§

fn get_burn_start_height(&self) -> u32

Returns the height of the burnchain when the Stacks chain started running.

source§

fn get_burn_header_hash( &self, height: u32, sortition_id: &SortitionId ) -> Option<BurnchainHeaderHash>

Returns the burnchain header hash for the given burn block height, as queried from the given SortitionId.

Returns Some if self.get_burn_start_height() <= height < self.get_burn_block_height(sorition_id), and None otherwise.

source§

fn get_sortition_id_from_consensus_hash( &self, consensus_hash: &ConsensusHash ) -> Option<SortitionId>

Lookup a SortitionId keyed to a ConsensusHash.

Returns None if no block found.

source§

fn get_stacks_epoch(&self, height: u32) -> Option<StacksEpoch>

The epoch is defined as by a start and end height. This returns the epoch enclosing height.

source§

fn get_pox_payout_addrs( &self, height: u32, sortition_id: &SortitionId ) -> Option<(Vec<TupleData>, u128)>

Get the PoX payout addresses for a given burnchain block

source§

fn get_v1_unlock_height(&self) -> u32

source§

fn get_v2_unlock_height(&self) -> u32

source§

fn get_pox_3_activation_height(&self) -> u32

source§

fn get_pox_prepare_length(&self) -> u32

source§

fn get_pox_reward_cycle_length(&self) -> u32

source§

fn get_pox_rejection_fraction(&self) -> u64

source§

fn get_stacks_epoch_by_epoch_id( &self, epoch_id: &StacksEpochId ) -> Option<StacksEpoch>

source§

fn get_ast_rules(&self, height: u32) -> ASTRules

source§

impl Clone for BurnDatastore

source§

fn clone(&self) -> BurnDatastore

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BurnDatastore

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl HeadersDB for BurnDatastore

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more