remove uneeded accumulateStorageChanges

pull/7/head
yann300 8 years ago
parent 37804ac5fe
commit ada5dc3356
  1. 17
      src/storage/storageResolver.js

@ -47,19 +47,6 @@ class StorageResolver {
isComplete (address) { isComplete (address) {
return this.storageByAddress[address] && this.storageByAddress[address].complete return this.storageByAddress[address] && this.storageByAddress[address].complete
} }
/**
* resolve the storage to the specified execution step @arg index. uses the traceManager.accumulateStorageChanges
*
* @param {Int} index - execution step index
* @param {String} address - contract address
* @param {Map} storage - Map of the known storage
* @param {Int} stepIndex - vm trave index
* @return {Map} - The storage resolved to the given exection point
*/
accumulateStorageChanges (stepIndex, address, storage, callback) {
this.traceManager.accumulateStorageChanges(stepIndex, address, storage, callback)
}
} }
function resolveAddress (self, stepIndex, callback) { function resolveAddress (self, stepIndex, callback) {
@ -103,14 +90,14 @@ function storageRangeInternal (self, start, fullStorage, tx, stepIndex, callback
} else { } else {
var cached = fromCache(self, address, start) var cached = fromCache(self, address, start)
if (cached) { if (cached) {
self.accumulateStorageChanges(stepIndex, address, cached, callback) self.traceManager.accumulateStorageChanges(stepIndex, address, cached, callback)
} else { } else {
storageRangeWeb3Call(tx, address, start, fullStorage, (error, storage, complete) => { storageRangeWeb3Call(tx, address, start, fullStorage, (error, storage, complete) => {
if (error) { if (error) {
callback(error) callback(error)
} else { } else {
toCache(self, address, storage, fullStorage, complete) toCache(self, address, storage, fullStorage, complete)
self.accumulateStorageChanges(stepIndex, address, storage, callback) self.traceManager.accumulateStorageChanges(stepIndex, address, storage, callback)
} }
}) })
} }

Loading…
Cancel
Save