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
75daf5ac
Commit
75daf5ac
authored
Aug 15, 2017
by
yann300
Committed by
GitHub
Aug 15, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #688 from ethereum/fixAccountbalance
fix vm accounts balance
parents
24c4642a
a52a8a76
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
universal-dapp.js
src/universal-dapp.js
+7
-8
No files found.
src/universal-dapp.js
View file @
75daf5ac
...
...
@@ -124,11 +124,12 @@ UniversalDApp.prototype.reset = function (contracts, transactionContextAPI) {
this
.
transactionContextAPI
=
transactionContextAPI
this
.
accounts
=
{}
if
(
this
.
executionContext
.
isVM
())
{
this
.
_addAccount
(
'3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511'
)
this
.
_addAccount
(
'2ac6c190b09897cd8987869cc7b918cfea07ee82038d492abce033c75c1b1d0c'
)
this
.
_addAccount
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
)
this
.
_addAccount
(
'd74aa6d18aa79a05f3473dd030a97d3305737cbc8337d940344345c1f6b72eea'
)
this
.
_addAccount
(
'71975fbf7fe448e004ac7ae54cad0a383c3906055a65468714156a07385e96ce'
)
this
.
_addAccount
(
'3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511'
,
'0x56BC75E2D63100000'
)
this
.
_addAccount
(
'2ac6c190b09897cd8987869cc7b918cfea07ee82038d492abce033c75c1b1d0c'
,
'0x56BC75E2D63100000'
)
this
.
_addAccount
(
'dae9801649ba2d95a21e688b56f77905e5667c44ce868ec83f82e838712a2c7a'
,
'0x56BC75E2D63100000'
)
this
.
_addAccount
(
'd74aa6d18aa79a05f3473dd030a97d3305737cbc8337d940344345c1f6b72eea'
,
'0x56BC75E2D63100000'
)
this
.
_addAccount
(
'71975fbf7fe448e004ac7ae54cad0a383c3906055a65468714156a07385e96ce'
,
'0x56BC75E2D63100000'
)
this
.
vm
.
stateManager
.
cache
.
flush
(
function
()
{})
}
this
.
txRunner
=
new
TxRunner
(
this
.
executionContext
,
this
.
accounts
,
{
queueTxs
:
true
,
...
...
@@ -164,9 +165,7 @@ UniversalDApp.prototype._addAccount = function (privateKey, balance) {
var
address
=
ethJSUtil
.
privateToAddress
(
privateKey
)
// 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
.
cache
.
flush
(
function
()
{})
})
self
.
vm
.
stateManager
.
putAccountBalance
(
address
,
balance
||
'0xf00000000000000001'
,
function
cb
()
{})
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