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
7a64989b
Commit
7a64989b
authored
Apr 20, 2017
by
yann300
Committed by
GitHub
Apr 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #464 from ethereum/newStorageScheme
Change storagedump implementation to fit storageRangeAt
parents
f303e7f7
2be6c5ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
.babelrc
.babelrc
+23
-0
execution-context.js
src/app/execution-context.js
+6
-2
No files found.
.babelrc
0 → 100644
View file @
7a64989b
{
"plugins": ["fast-async",
"check-es2015-constants",
"transform-es2015-arrow-functions",
"transform-es2015-block-scoped-functions",
"transform-es2015-block-scoping",
"transform-es2015-classes",
"transform-es2015-computed-properties",
"transform-es2015-destructuring",
"transform-es2015-duplicate-keys",
"transform-es2015-for-of",
"transform-es2015-function-name",
"transform-es2015-literals",
"transform-es2015-object-super",
"transform-es2015-parameters",
"transform-es2015-shorthand-properties",
"transform-es2015-spread",
"transform-es2015-sticky-regex",
"transform-es2015-unicode-regex",
"transform-object-assign",
]
}
\ No newline at end of file
src/app/execution-context.js
View file @
7a64989b
...
...
@@ -28,7 +28,7 @@ class StateManagerCommonStorageDump extends StateManager {
}
putContractStorage
(
address
,
key
,
value
,
cb
)
{
this
.
keyHashes
[
ethUtil
.
sha3
(
key
)]
=
ethUtil
.
bufferToHex
(
key
)
this
.
keyHashes
[
ethUtil
.
sha3
(
key
)
.
toString
(
'hex'
)
]
=
ethUtil
.
bufferToHex
(
key
)
super
.
putContractStorage
(
address
,
key
,
value
,
cb
)
}
...
...
@@ -41,7 +41,11 @@ class StateManagerCommonStorageDump extends StateManager {
var
storage
=
{}
var
stream
=
trie
.
createReadStream
()
stream
.
on
(
'data'
,
function
(
val
)
{
storage
[
self
.
keyHashes
[
val
.
key
]]
=
val
.
value
.
toString
(
'hex'
)
storage
[
'0x'
+
val
.
key
.
toString
(
'hex'
)]
=
{
hashedKey
:
'0x'
+
val
.
key
.
toString
(
'hex'
),
key
:
self
.
keyHashes
[
val
.
key
.
toString
(
'hex'
)],
value
:
'0x'
+
val
.
value
.
toString
(
'hex'
)
}
})
stream
.
on
(
'end'
,
function
()
{
cb
(
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