Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
16ea5a93
Commit
16ea5a93
authored
Apr 10, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename resolveStorage => accumulateStorageChanges
parent
097a0a4a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
storageResolver.js
src/storage/storageResolver.js
+3
-3
traceCache.js
src/trace/traceCache.js
+1
-1
traceManager.js
src/trace/traceManager.js
+2
-2
traceManager.js
test/traceManager.js
+2
-2
No files found.
src/storage/storageResolver.js
View file @
16ea5a93
...
...
@@ -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
)
}
}
...
...
src/trace/traceCache.js
View file @
16ea5a93
...
...
@@ -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
]
...
...
src/trace/traceManager.js
View file @
16ea5a93
...
...
@@ -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
)
}
...
...
test/traceManager.js
View file @
16ea5a93
...
...
@@ -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
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment