|
|
|
@ -79,21 +79,6 @@ class StateManagerCommonStorageDump extends DefaultStateManager { |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async setStateRoot (stateRoot) { |
|
|
|
|
await this._cache.flush() |
|
|
|
|
|
|
|
|
|
if (!stateRoot.equals(this._trie.EMPTY_TRIE_ROOT)) { |
|
|
|
|
const hasRoot = await this._trie.checkRoot(stateRoot) |
|
|
|
|
if (!hasRoot) { |
|
|
|
|
throw new Error('State trie does not contain state root') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this._trie.root = stateRoot |
|
|
|
|
this._cache.clear() |
|
|
|
|
this._storageTries = {} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export type CurrentVm = { |
|
|
|
|