fix vm web3 provider

pull/7/head
yann300 8 years ago
parent 6f96dc5737
commit 3da6ebc586
  1. 2
      src/storage/storageResolver.js
  2. 4
      src/web3Provider/web3VmProvider.js

@ -110,7 +110,7 @@ function toCache (self, address, storage) {
function storageRangeWeb3Call (tx, address, start, maxSize, callback) {
if (traceHelper.isContractCreation(address)) {
callback(null, {}, true)
callback(null, {}, null)
} else {
util.web3.debug.storageRangeAt(
tx.blockHash, tx.transactionIndex === undefined ? tx.hash : tx.transactionIndex,

@ -158,8 +158,8 @@ web3VmProvider.prototype.storageRangeAt = function (blockNumber, txIndex, addres
if (this.storageCache[txIndex] && this.storageCache[txIndex][address]) {
var storage = this.storageCache[txIndex][address]
return cb(null, {
storage: JSON.parse(JSON.stringify(storage)), // copy
complete: true
storage: Object.assign({}, storage),
nextKey: null
})
} else {
cb('unable to retrieve storage ' + txIndex + ' ' + address)

Loading…
Cancel
Save