pull/5370/head
yann300 4 years ago
parent 78a73f3444
commit 348ace4cb1
  1. 1
      libs/remix-debug/src/solidity-decoder/types/Mapping.ts
  2. 9
      libs/remix-lib/src/execution/execution-context.ts

@ -2,7 +2,6 @@
import { RefType } from './RefType'
import { normalizeHex } from './util'
import { toBuffer, setLengthLeft, keccak, BN, bufferToHex } from 'ethereumjs-util'
import { intToBuffer } from 'ethjs-util'
export class Mapping extends RefType {
keyType

@ -31,7 +31,6 @@ class StateManagerCommonStorageDump extends StateManager {
this.keyHashes = {}
}
putContractStorage (address, key, value) {
this.keyHashes[keccak(key).toString('hex')] = bufferToHex(key)
return super.putContractStorage(address, key, value)
@ -58,7 +57,7 @@ class StateManagerCommonStorageDump extends StateManager {
})
}
async getStateRoot (force: boolean = false): Promise<Buffer> {
async getStateRoot (force: boolean = false): Promise<Buffer> {
if (!force && this._checkpointCount !== 0) {
// throw new Error('Cannot get state root with uncommitted checkpoints')
}
@ -67,9 +66,9 @@ async getStateRoot (force: boolean = false): Promise<Buffer> {
const stateRoot = this._trie.root
return stateRoot
}
}
async setStateRoot (stateRoot: Buffer): Promise<void> {
async setStateRoot (stateRoot: Buffer): Promise<void> {
if (this._checkpointCount !== 0) {
// throw new Error('Cannot set state root with uncommitted checkpoints')
}
@ -91,7 +90,7 @@ async setStateRoot (stateRoot: Buffer): Promise<void> {
this._trie.root = stateRoot
this._cache.clear()
this._storageTries = {}
}
}
}
/*

Loading…
Cancel
Save