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
dc0865fc
Commit
dc0865fc
authored
Jun 18, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix initial block generation
parent
80f1a9ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
execution-context.js
remix-lib/src/execution/execution-context.js
+3
-0
txRunner.js
remix-lib/src/execution/txRunner.js
+1
-1
genesis.js
remix-simulator/src/genesis.js
+1
-1
No files found.
remix-lib/src/execution/execution-context.js
View file @
dc0865fc
...
...
@@ -298,6 +298,9 @@ function ExecutionContext () {
this
.
addBlock
=
function
(
block
)
{
let
blockNumber
=
'0x'
+
block
.
header
.
number
.
toString
(
'hex'
)
if
(
blockNumber
===
"0x"
)
{
blockNumber
=
"0x0"
}
blockNumber
=
web3
.
toHex
(
web3
.
toBigNumber
(
blockNumber
))
self
.
blocks
[
'0x'
+
block
.
hash
().
toString
(
'hex'
)]
=
block
...
...
remix-lib/src/execution/txRunner.js
View file @
dc0865fc
...
...
@@ -14,7 +14,7 @@ class TxRunner {
this
.
runAsync
=
true
if
(
executionContext
.
isVM
())
{
// this.blockNumber = 1150000 // The VM is running in Homestead mode, which started at this block.
this
.
blockNumber
=
2
// The VM is running in Homestead mode, which started at this block.
this
.
blockNumber
=
0
// The VM is running in Homestead mode, which started at this block.
this
.
runAsync
=
false
// We have to run like this cause the VM Event Manager does not support running multiple txs at the same time.
}
this
.
pendingTxs
=
{}
...
...
remix-simulator/src/genesis.js
View file @
dc0865fc
...
...
@@ -8,7 +8,7 @@ function generateBlock () {
var
block
=
new
EthJSBlock
({
header
:
{
timestamp
:
(
new
Date
().
getTime
()
/
1000
|
0
),
number
:
1
,
number
:
0
,
coinbase
:
'0x0e9281e9c6a0808672eaba6bd1220e144c9bb07a'
,
difficulty
:
(
new
BN
(
'69762765929000'
,
10
)),
gasLimit
:
new
BN
(
'8000000'
).
imuln
(
1
)
...
...
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