Merge pull request #817 from ethereum/fixStorage

rlp decode value before adding to cache
pull/1/head
yann300 7 years ago committed by GitHub
commit 92b79e1df8
  1. 4
      src/execution-context.js

@ -8,6 +8,7 @@ var ethUtil = require('ethereumjs-util')
var StateManager = require('ethereumjs-vm/lib/stateManager')
var remix = require('ethereum-remix')
var Web3VMProvider = remix.web3.web3VMProvider
var rlp = ethUtil.rlp
var injectedProvider
@ -45,9 +46,10 @@ class StateManagerCommonStorageDump extends StateManager {
var storage = {}
var stream = trie.createReadStream()
stream.on('data', function (val) {
var value = rlp.decode(val.value)
storage['0x' + val.key.toString('hex')] = {
key: self.keyHashes[val.key.toString('hex')],
value: '0x' + val.value.toString('hex')
value: '0x' + value.toString('hex')
}
})
stream.on('end', function () {

Loading…
Cancel
Save