trait ReplayPolicy<FEN: FoundryEvmNetwork> {
type Outcome: Clone;
// Required methods
fn accumulate_warp_roll(&self) -> bool;
fn on_call(
&self,
calls: &[BasicTxDetails],
sequence: &[usize],
idx: usize,
call_result: RawCallResult<FEN>,
counters: &mut ReplayCounters,
) -> Option<Self::Outcome>;
fn finish(
&self,
executor: &mut Executor<FEN>,
counters: &ReplayCounters,
) -> Result<Self::Outcome>;
// Provided method
fn before_call(
&self,
_executor: &mut Executor<FEN>,
_sequence: &[usize],
_idx: usize,
) -> Result<()> { ... }
}Expand description
What a sequence replay does with each kept call and with the final state.
Required Associated Types§
Required Methods§
Sourcefn accumulate_warp_roll(&self) -> bool
fn accumulate_warp_roll(&self) -> bool
Whether warp/roll of removed calls is folded into the next kept call.
Sourcefn on_call(
&self,
calls: &[BasicTxDetails],
sequence: &[usize],
idx: usize,
call_result: RawCallResult<FEN>,
counters: &mut ReplayCounters,
) -> Option<Self::Outcome>
fn on_call( &self, calls: &[BasicTxDetails], sequence: &[usize], idx: usize, call_result: RawCallResult<FEN>, counters: &mut ReplayCounters, ) -> Option<Self::Outcome>
Classifies one replayed call of sequence. Returns the outcome when the call stops the
replay. The decision for a call that is not the last kept call must not depend on the
calls after it, because PrefixReplay reuses it for later candidates.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".