Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Re-enter runtime after resetting overlay from runtime
This still assumes that the client did not start any transactions
before calling into runtime. This is the case for benchmarking
as long as either NativeWhenPossible or AlwaysWasm exection
strategy is chosen. Using any other will result in a panic.
  • Loading branch information
athei committed Jun 25, 2020
commit 6bddb641e7c3cff4ee499f9b6301e02a05fb0dfc
6 changes: 6 additions & 0 deletions primitives/state-machine/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ where
).expect(EXT_NOT_ALLOWED_TO_FAIL);
self.backend.wipe().expect(EXT_NOT_ALLOWED_TO_FAIL);
self.mark_dirty();
self.overlay
.enter_runtime()
.expect("We have reset the overlay above, so we can not be in the runtime; qed");
}

fn commit(&mut self) {
Expand All @@ -593,6 +596,9 @@ where
changes.main_storage_changes,
).expect(EXT_NOT_ALLOWED_TO_FAIL);
self.mark_dirty();
self.overlay
.enter_runtime()
.expect("We have reset the overlay above, so we can not be in the runtime; qed");
}

fn read_write_count(&self) -> (u32, u32, u32, u32) {
Expand Down