pub struct LedgerSimulatorBuilder<E, D> { /* private fields */ }
Implementations§
Source§impl<E: NativeVmExtension, D: TestDatabase> LedgerSimulatorBuilder<E, D>
impl<E: NativeVmExtension, D: TestDatabase> LedgerSimulatorBuilder<E, D>
pub fn network_definition() -> NetworkDefinition
pub fn with_state_hashing( self, ) -> LedgerSimulatorBuilder<E, StateTreeUpdatingDatabase<D>>
Sourcepub fn with_kernel_trace(self) -> Self
pub fn with_kernel_trace(self) -> Self
Overrides the kernel trace setting to true
for all executed transactions.
Sourcepub fn without_kernel_trace(self) -> Self
pub fn without_kernel_trace(self) -> Self
Overrides the kernel trace setting to false
for all executed transactions.
Sourcepub fn with_cost_breakdown(self) -> Self
pub fn with_cost_breakdown(self) -> Self
Overrides the cost breakdown setting to true
for all executed transactions.
Sourcepub fn without_cost_breakdown(self) -> Self
pub fn without_cost_breakdown(self) -> Self
Overrides the cost breakdown setting to false
for all executed transactions.
pub fn with_receipt_substate_check(self) -> Self
pub fn without_receipt_substate_check(self) -> Self
pub fn with_custom_extension<NE: NativeVmExtension>( self, extension: NE, ) -> LedgerSimulatorBuilder<NE, D>
pub fn with_custom_database<ND: TestDatabase>( self, database: ND, ) -> LedgerSimulatorBuilder<E, ND>
Sourcepub fn with_custom_genesis(self, genesis: BabylonSettings) -> Self
👎Deprecated: Use with_custom_protocol(|builder| builder.with_babylon(genesis).from_bootstrap_to_latest()) instead
pub fn with_custom_genesis(self, genesis: BabylonSettings) -> Self
Note - this overwrites / is overwritten by any other protocol overrides.
Use Self::with_custom_protocol
for full control.
If you previously just used CustomGenesis::test_default
in order to get round
change tests to pass, this is no longer necessary.
pub fn with_custom_protocol( self, executor: impl FnOnce(ProtocolBuilder) -> ProtocolExecutor, ) -> Self
Sourcepub fn with_protocol_version(self, protocol_version: ProtocolVersion) -> Self
👎Deprecated: Use with_custom_protocol(|builder| builder.from_bootstrap_to(protocol_version)) instead
pub fn with_protocol_version(self, protocol_version: ProtocolVersion) -> Self
Note - this overwrites / is overwritten by any other protocol overrides.
Use Self::with_custom_protocol
for full control.
pub fn build_from_snapshot( self, snapshot: LedgerSimulatorSnapshot, ) -> LedgerSimulator<E, InMemorySubstateDatabase>
Sourcepub fn build_and_get_post_genesis_epoch_change(
self,
) -> (LedgerSimulator<E, D>, Option<EpochChangeEvent>)
pub fn build_and_get_post_genesis_epoch_change( self, ) -> (LedgerSimulator<E, D>, Option<EpochChangeEvent>)
NOTE: The epoch change isn’t available if the protocol builder does not run genesis.
pub fn build(self) -> LedgerSimulator<E, D>
Auto Trait Implementations§
impl<E, D> Freeze for LedgerSimulatorBuilder<E, D>
impl<E, D> RefUnwindSafe for LedgerSimulatorBuilder<E, D>where
E: RefUnwindSafe,
D: RefUnwindSafe,
impl<E, D> Send for LedgerSimulatorBuilder<E, D>
impl<E, D> Sync for LedgerSimulatorBuilder<E, D>
impl<E, D> Unpin for LedgerSimulatorBuilder<E, D>
impl<E, D> UnwindSafe for LedgerSimulatorBuilder<E, D>where
E: UnwindSafe,
D: UnwindSafe,
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
Source§impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync 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> ⓘ
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 more