Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Re-enter runtime after resetting overlay from runtime (#6513)
Browse files Browse the repository at this point in the history
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
1 parent f5a5937 commit a1877dc
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit a1877dc

Please sign in to comment.