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
f681c136
Commit
f681c136
authored
Jul 24, 2017
by
yann300
Committed by
GitHub
Jul 24, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #639 from ethereum/fixVMAccounts
fix account balance init
parents
54200e63
9abade28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
universal-dapp.js
src/universal-dapp.js
+3
-2
No files found.
src/universal-dapp.js
View file @
f681c136
...
@@ -179,8 +179,9 @@ UniversalDApp.prototype._addAccount = function (privateKey, balance) {
...
@@ -179,8 +179,9 @@ UniversalDApp.prototype._addAccount = function (privateKey, balance) {
var
address
=
ethJSUtil
.
privateToAddress
(
privateKey
)
var
address
=
ethJSUtil
.
privateToAddress
(
privateKey
)
// FIXME: we don't care about the callback, but we should still make this proper
// FIXME: we don't care about the callback, but we should still make this proper
self
.
vm
.
stateManager
.
putAccountBalance
(
address
,
balance
||
'f00000000000000001'
,
function
cb
()
{})
self
.
vm
.
stateManager
.
putAccountBalance
(
address
,
balance
||
'f00000000000000001'
,
function
cb
()
{
self
.
vm
.
stateManager
.
cache
.
flush
(
function
()
{})
})
self
.
accounts
[
'0x'
+
address
.
toString
(
'hex'
)]
=
{
privateKey
:
privateKey
,
nonce
:
0
}
self
.
accounts
[
'0x'
+
address
.
toString
(
'hex'
)]
=
{
privateKey
:
privateKey
,
nonce
:
0
}
}
}
}
}
...
...
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