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
3ec6a80c
Commit
3ec6a80c
authored
Apr 11, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo
parent
f96876b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
storageResolver.js
src/storage/storageResolver.js
+5
-6
No files found.
src/storage/storageResolver.js
View file @
3ec6a80c
...
...
@@ -67,11 +67,11 @@ function storageRangeInternal (self, slotKey, tx, stepIndex, fullStorage, callba
if
(
error
)
{
return
callback
(
error
)
}
if
(
!
fullStorage
&&
storageChanges
[
slotKey
])
{
if
(
!
fullStorage
&&
storageChanges
[
slotKey
])
{
// don't need the full storage just returning the value from the storageChanges
return
callback
(
null
,
storageChanges
)
}
var
cached
=
fromCache
(
self
,
address
,
slotKey
)
if
(
cached
&&
cached
[
slotKey
])
{
// we have the current slot in the cache and maybe the next 1000
...
var
cached
=
fromCache
(
self
,
address
)
if
(
cached
&&
cached
[
slotKey
])
{
// we have the current slot in the cache and maybe the next 1000...
return
callback
(
null
,
Object
.
assign
(
cached
,
storageChanges
))
}
storageRangeWeb3Call
(
tx
,
address
,
slotKey
,
self
.
maxSize
,
(
error
,
storage
,
complete
)
=>
{
...
...
@@ -92,14 +92,13 @@ function storageRangeInternal (self, slotKey, tx, stepIndex, fullStorage, callba
* retrieve the storage from the cache. if @arg slot is defined, return only the desired slot, if not return the entire known storage
*
* @param {String} address - contract address
* @param {String} slotKey - key of the value to return
* @return {String} - either the entire known storage or a single value
*/
function
fromCache
(
self
,
address
,
hashedKey
)
{
function
fromCache
(
self
,
address
)
{
if
(
!
self
.
storageByAddress
[
address
])
{
return
null
}
return
hashedKey
?
self
.
storageByAddress
[
address
].
storage
[
hashedKey
]
:
self
.
storageByAddress
[
address
].
storage
return
self
.
storageByAddress
[
address
]
}
/**
...
...
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