pub struct VirtualStateProcessor {
pub lkg_virtual_state: LkgVirtualState,
/* private fields */
}Fields§
§lkg_virtual_state: LkgVirtualStateThe “last known good” virtual state. To be used by any logic which does not want to wait for a possible virtual state write to complete but can rather settle with the last known state
Implementations§
Source§impl VirtualStateProcessor
impl VirtualStateProcessor
pub fn new( receiver: CrossbeamReceiver<VirtualStateProcessingMessage>, pruning_sender: CrossbeamSender<PruningProcessingMessage>, pruning_receiver: CrossbeamReceiver<PruningProcessingMessage>, thread_pool: Arc<ThreadPool>, params: &Params, db: Arc<DB>, storage: &Arc<ConsensusStorage>, services: &Arc<ConsensusServices>, pruning_lock: SessionLock, notification_root: Arc<ConsensusNotificationRoot>, counters: Arc<ProcessingCounters>, ) -> Self
pub fn worker(self: &Arc<Self>)
pub fn validate_mempool_transaction( &self, mutable_tx: &mut MutableTransaction, args: &TransactionValidationArgs, ) -> TxResult<()>
pub fn validate_mempool_transactions_in_parallel( &self, mutable_txs: &mut [MutableTransaction], args: &TransactionValidationBatchArgs, ) -> Vec<TxResult<()>> ⓘ
pub fn populate_mempool_transaction( &self, mutable_tx: &mut MutableTransaction, ) -> TxResult<()>
pub fn populate_mempool_transactions_in_parallel( &self, mutable_txs: &mut [MutableTransaction], ) -> Vec<TxResult<()>> ⓘ
pub fn build_block_template( &self, miner_data: MinerData, tx_selector: Box<dyn TemplateTransactionSelector>, build_mode: TemplateBuildMode, ) -> Result<BlockTemplate, RuleError>
Sourcepub fn process_genesis(self: &Arc<Self>)
pub fn process_genesis(self: &Arc<Self>)
Initializes UTXO state of genesis and points virtual at genesis.
Note that pruning point-related stores are initialized by init
Sourcepub fn import_pruning_point_utxo_set(
&self,
new_pruning_point: Hash,
imported_utxo_multiset: MuHash,
) -> PruningImportResult<()>
pub fn import_pruning_point_utxo_set( &self, new_pruning_point: Hash, imported_utxo_multiset: MuHash, ) -> PruningImportResult<()>
Finalizes the pruning point utxoset state and imports the pruning point utxoset to virtual utxoset
pub fn are_pruning_points_violating_finality( &self, pp_list: PruningPointsList, ) -> bool
Auto Trait Implementations§
impl Freeze for VirtualStateProcessor
impl !RefUnwindSafe for VirtualStateProcessor
impl Send for VirtualStateProcessor
impl Sync for VirtualStateProcessor
impl Unpin for VirtualStateProcessor
impl !UnwindSafe for VirtualStateProcessor
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<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
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