Commit 16ea5a93 authored by yann300's avatar yann300

rename resolveStorage => accumulateStorageChanges

parent 097a0a4a
......@@ -57,7 +57,7 @@ class StorageResolver {
}
/**
* resolve the storage to the specified execution step @arg index. uses the traceManager.resolveStorage
* 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
......@@ -65,8 +65,8 @@ class StorageResolver {
* @param {Int} stepIndex - vm trave index
* @return {Map} - The storage resolved to the given exection point
*/
resolveStorage (stepIndex, address, storage, callback) {
this.traceManager.resolveStorage(stepIndex, address, storage, callback)
accumulateStorageChanges (stepIndex, address, storage, callback) {
this.traceManager.accumulateStorageChanges(stepIndex, address, storage, callback)
}
}
......
......@@ -92,7 +92,7 @@ TraceCache.prototype.pushStoreChanges = function (index, address, key, value) {
this.storageChanges.push(index)
}
TraceCache.prototype.resolveStorage = function (index, address, storage) {
TraceCache.prototype.accumulateStorageChanges = function (index, address, storage) {
var ret = Object.assign({}, storage)
for (var k in this.storageChanges) {
var changesIndex = this.storageChanges[k]
......
......@@ -74,8 +74,8 @@ TraceManager.prototype.getLength = function (callback) {
}
}
TraceManager.prototype.resolveStorage = function (index, address, storageOrigin, callback) {
var storage = this.traceCache.resolveStorage(index, address, storageOrigin)
TraceManager.prototype.accumulateStorageChanges = function (index, address, storageOrigin, callback) {
var storage = this.traceCache.accumulateStorageChanges(index, address, storageOrigin)
callback(null, storage)
}
......
......@@ -53,8 +53,8 @@ tape('TraceManager', function (t) {
st.end()
})
t.test('TraceManager.resolveStorage', function (st) {
traceManager.resolveStorage(110, '0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5', {}, function (error, result) {
t.test('TraceManager.accumulateStorageChanges', function (st) {
traceManager.accumulateStorageChanges(110, '0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5', {}, function (error, result) {
if (error) {
st.fail(error)
} 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