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
5330b513
Commit
5330b513
authored
Apr 12, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zeroSlot variable
parent
f3a8cf40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
storageResolver.js
src/storage/storageResolver.js
+5
-3
No files found.
src/storage/storageResolver.js
View file @
5330b513
...
...
@@ -18,7 +18,7 @@ class StorageResolver {
* @param {Function} - callback - contains a map: [hashedKey] = {key, hashedKey, value}
*/
storageRange
(
tx
,
stepIndex
,
callback
)
{
storageRangeInternal
(
this
,
'0x0000000000000000000000000000000000000000000000000000000000000000'
,
tx
,
stepIndex
,
true
,
callback
)
storageRangeInternal
(
this
,
zeroSlot
,
tx
,
stepIndex
,
true
,
callback
)
}
/**
...
...
@@ -79,11 +79,11 @@ function storageRangeInternal (self, slotKey, tx, stepIndex, fullStorage, callba
if
(
!
storage
[
slotKey
])
{
storage
[
slotKey
]
=
{
key
:
slotKey
,
value
:
'0x0000000000000000000000000000000000000000000000000000000000000000'
value
:
zeroSlot
}
}
toCache
(
self
,
address
,
storage
)
if
(
slotKey
===
'0x0000000000000000000000000000000000000000000000000000000000000000'
&&
Object
.
keys
(
storage
).
length
<
self
.
maxSize
)
{
if
(
slotKey
===
zeroSlot
&&
Object
.
keys
(
storage
).
length
<
self
.
maxSize
)
{
self
.
storageByAddress
[
address
].
complete
=
true
}
callback
(
null
,
Object
.
assign
(
storage
,
storageChanges
))
...
...
@@ -92,6 +92,8 @@ function storageRangeInternal (self, slotKey, tx, stepIndex, fullStorage, callba
})
}
var
zeroSlot
=
'0x0000000000000000000000000000000000000000000000000000000000000000'
/**
* retrieve the storage from the cache. if @arg slot is defined, return only the desired slot, if not return the entire known storage
*
...
...
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