pub struct TestBlockBuilder { /* private fields */ }Expand description
Wrapper for virtual processor with util methods for building a block with any parent context
Implementations§
Source§impl TestBlockBuilder
impl TestBlockBuilder
pub fn new(processor: Arc<VirtualStateProcessor>) -> Self
Methods from Deref<Target = VirtualStateProcessor>§
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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestBlockBuilder
impl !RefUnwindSafe for TestBlockBuilder
impl Send for TestBlockBuilder
impl Sync for TestBlockBuilder
impl Unpin for TestBlockBuilder
impl !UnwindSafe for TestBlockBuilder
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