pub(crate) struct ActiveHistory(pub VecDeque<ExecutionOutput>);Expand description
History of the outputs of recently executed slots. Slots should be consecutive, oldest at the beginning and latest at the back.
Tuple Fields§
§0: VecDeque<ExecutionOutput>Implementations§
source§impl ActiveHistory
impl ActiveHistory
sourcepub fn truncate_from(&mut self, slot: &Slot, thread_count: u8)
pub fn truncate_from(&mut self, slot: &Slot, thread_count: u8)
Remove slot and the slots after it from history
sourcepub fn fetch_executed_op(&self, op_id: &OperationId) -> HistorySearchResult<()>
pub fn fetch_executed_op(&self, op_id: &OperationId) -> HistorySearchResult<()>
Lazily query (from end to beginning) the active list of executed ops to check if an op was executed.
Returns a HistorySearchResult.
sourcepub fn fetch_executed_denunciation(
&self,
de_idx: &DenunciationIndex,
) -> HistorySearchResult<()>
pub fn fetch_executed_denunciation( &self, de_idx: &DenunciationIndex, ) -> HistorySearchResult<()>
Lazily query (from end to beginning) the active list of executed denunciations.
Returns a HistorySearchResult.
sourcepub fn fetch_balance(&self, addr: &Address) -> HistorySearchResult<Amount>
pub fn fetch_balance(&self, addr: &Address) -> HistorySearchResult<Amount>
Lazily query (from end to beginning) the active balance of an address after a given index.
Returns a HistorySearchResult.
sourcepub fn fetch_bytecode(&self, addr: &Address) -> HistorySearchResult<Bytecode>
pub fn fetch_bytecode(&self, addr: &Address) -> HistorySearchResult<Bytecode>
Lazily query (from end to beginning) the active bytecode of an address after a given index.
Returns a HistorySearchResult.
sourcepub fn fetch_active_history_data_entry(
&self,
addr: &Address,
key: &[u8],
) -> HistorySearchResult<Vec<u8>>
pub fn fetch_active_history_data_entry( &self, addr: &Address, key: &[u8], ) -> HistorySearchResult<Vec<u8>>
Lazily query (from end to beginning) the active datastore entry of an address after a given index.
Returns a HistorySearchResult.
sourcepub fn fetch_roll_count(&self, addr: &Address) -> Option<u64>
pub fn fetch_roll_count(&self, addr: &Address) -> Option<u64>
Starting from the newest element in history, return the first existing roll change of addr.
§Arguments
addr: address to fetch the rolls from
sourcepub fn get_all_deferred_credits_until(&self, slot: &Slot) -> DeferredCredits
pub fn get_all_deferred_credits_until(&self, slot: &Slot) -> DeferredCredits
Gets all the deferred credits that will be credited until a given slot (included)
sourcepub(crate) fn get_address_deferred_credit_for(
&self,
addr: &Address,
slot: &Slot,
) -> Option<Amount>
pub(crate) fn get_address_deferred_credit_for( &self, addr: &Address, slot: &Slot, ) -> Option<Amount>
Gets the deferred credits for a given address that will be credited at a given slot
sourcepub fn get_execution_trail_hash(&self) -> HistorySearchResult<Hash>
pub fn get_execution_trail_hash(&self) -> HistorySearchResult<Hash>
Gets the execution trail hash
sourcepub fn get_slot_index(&self, slot: &Slot, thread_count: u8) -> SlotIndexPosition
pub fn get_slot_index(&self, slot: &Slot, thread_count: u8) -> SlotIndexPosition
Gets the index of a slot in history
sourcepub fn find_cycle_indices(
&self,
cycle: u64,
periods_per_cycle: u64,
thread_count: u8,
) -> (Range<usize>, bool, bool)
pub fn find_cycle_indices( &self, cycle: u64, periods_per_cycle: u64, thread_count: u8, ) -> (Range<usize>, bool, bool)
Find the history range of a cycle
§Return value
Tuple with the following elements:
- a range of indices
- a boolean indicating that the cycle overflows before the beginning of history
- a boolean indicating that the cycle overflows after the end of history
sourcepub fn get_ops_exec_status(&self, batch: &[OperationId]) -> Vec<Option<bool>>
pub fn get_ops_exec_status(&self, batch: &[OperationId]) -> Vec<Option<bool>>
Get the execution statuses of a set of operations. Returns a list where each element is None if no execution was found for that op, or a boolean indicating whether the execution was successful (true) or had an error (false).
Trait Implementations§
source§impl Default for ActiveHistory
impl Default for ActiveHistory
source§fn default() -> ActiveHistory
fn default() -> ActiveHistory
Auto Trait Implementations§
impl Freeze for ActiveHistory
impl RefUnwindSafe for ActiveHistory
impl Send for ActiveHistory
impl Sync for ActiveHistory
impl Unpin for ActiveHistory
impl UnwindSafe for ActiveHistory
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<T> Conv for T
impl<T> Conv for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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 moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.