Commit 3da6ebc5 authored by yann300's avatar yann300

fix vm web3 provider

parent 6f96dc57
...@@ -110,7 +110,7 @@ function toCache (self, address, storage) { ...@@ -110,7 +110,7 @@ function toCache (self, address, storage) {
function storageRangeWeb3Call (tx, address, start, maxSize, callback) { function storageRangeWeb3Call (tx, address, start, maxSize, callback) {
if (traceHelper.isContractCreation(address)) { if (traceHelper.isContractCreation(address)) {
callback(null, {}, true) callback(null, {}, null)
} else { } else {
util.web3.debug.storageRangeAt( util.web3.debug.storageRangeAt(
tx.blockHash, tx.transactionIndex === undefined ? tx.hash : tx.transactionIndex, tx.blockHash, tx.transactionIndex === undefined ? tx.hash : tx.transactionIndex,
......
...@@ -158,8 +158,8 @@ web3VmProvider.prototype.storageRangeAt = function (blockNumber, txIndex, addres ...@@ -158,8 +158,8 @@ web3VmProvider.prototype.storageRangeAt = function (blockNumber, txIndex, addres
if (this.storageCache[txIndex] && this.storageCache[txIndex][address]) { if (this.storageCache[txIndex] && this.storageCache[txIndex][address]) {
var storage = this.storageCache[txIndex][address] var storage = this.storageCache[txIndex][address]
return cb(null, { return cb(null, {
storage: JSON.parse(JSON.stringify(storage)), // copy storage: Object.assign({}, storage),
complete: true nextKey: null
}) })
} else { } else {
cb('unable to retrieve storage ' + txIndex + ' ' + address) cb('unable to retrieve storage ' + txIndex + ' ' + address)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment