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
7c752f0b
Commit
7c752f0b
authored
Dec 07, 2016
by
chriseth
Committed by
GitHub
Dec 07, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #353 from ethereum/vm-block-random
Support deterministically changing coinbase/difficulty/blockGasLimit on every block
parents
bff6dfdf
651d3b83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
txRunner.js
src/app/txRunner.js
+7
-2
No files found.
src/app/txRunner.js
View file @
7c752f0b
...
...
@@ -102,11 +102,16 @@ TxRunner.prototype.execute = function () {
data
:
new
Buffer
(
data
.
slice
(
2
),
'hex'
)
})
tx
.
sign
(
account
.
privateKey
)
const
coinbases
=
[
'0x0e9281e9c6a0808672eaba6bd1220e144c9bb07a'
,
'0x8945a1288dc78a6d8952a92c77aee6730b414778'
,
'0x94d76e24f818426ae84aa404140e8d5f60e10e7e'
]
const
difficulties
=
[
new
BN
(
'69762765929000'
,
10
),
new
BN
(
'70762765929000'
,
10
),
new
BN
(
'71762765929000'
,
10
)
]
var
block
=
new
EthJSBlock
({
header
:
{
// FIXME: support coinbase, difficulty and gasLimit
timestamp
:
new
Date
().
getTime
()
/
1000
|
0
,
number
:
self
.
blockNumber
number
:
self
.
blockNumber
,
coinbase
:
coinbases
[
self
.
blockNumber
%
coinbases
.
length
],
difficulty
:
difficulties
[
self
.
blockNumber
%
difficulties
.
length
],
gasLimit
:
new
BN
(
gasLimit
,
10
).
imuln
(
2
)
},
transactions
:
[],
uncleHeaders
:
[]
...
...
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