Skip to content

Commit 0928c1c

Browse files
committed
provide take state interface
1 parent 79dde48 commit 0928c1c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/scheduler.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,4 +681,10 @@ where
681681
pub fn force_sequential_execute(&mut self) -> Result<ExecuteOutput, GrevmError<DB::Error>> {
682682
self.evm_execute(Some(true), false, None)
683683
}
684+
685+
/// Take the state of the scheduler.
686+
/// It is typically called after the execution.
687+
pub fn take_state(self) -> Box<State> {
688+
Arc::try_unwrap(self.database).ok().unwrap().state
689+
}
684690
}

0 commit comments

Comments
 (0)