Commit ee2c3c44 authored by yann300's avatar yann300

fix storageRangeAt Call

parent e02ab03f
'use strict' 'use strict'
var traceHelper = require('../helpers/traceHelper') var traceHelper = require('../helpers/traceHelper')
var util = require('../helpers/global') var util = require('../helpers/global')
var BN = require('ethereumjs-util').BN
function TraceRetriever () { function TraceRetriever () {
} }
...@@ -22,10 +23,11 @@ TraceRetriever.prototype.getStorage = function (tx, address, callback) { ...@@ -22,10 +23,11 @@ TraceRetriever.prototype.getStorage = function (tx, address, callback) {
callback(null, {}) callback(null, {})
} else { } else {
if (util.web3.debug.storageRangeAt) { if (util.web3.debug.storageRangeAt) {
var maxLength = 100000 var end = 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
var maxSize = 10000
// The VM gives only a tx hash // The VM gives only a tx hash
// TODO: get rid of that and use the range parameters // TODO: get rid of that and use the range parameters
util.web3.debug.storageRangeAt(tx.blockHash, tx.transactionIndex === undefined ? tx.hash : tx.transactionIndex, address, '0x0', '0x' + (maxLength - 1).toString(16), maxLength, function (error, result) { util.web3.debug.storageRangeAt(tx.blockHash, tx.transactionIndex === undefined ? tx.hash : tx.transactionIndex, address, '0x0', '0x' + end, maxSize, function (error, result) {
callback(error, result.storage) callback(error, result.storage)
}) })
} else { } else {
......
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