diff --git a/remix-lib/src/execution/execution-context.js b/remix-lib/src/execution/execution-context.js index ce6beeb89d..85a15608b3 100644 --- a/remix-lib/src/execution/execution-context.js +++ b/remix-lib/src/execution/execution-context.js @@ -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 diff --git a/remix-lib/src/execution/txRunner.js b/remix-lib/src/execution/txRunner.js index 6816c60db4..d0f3fdf3d9 100644 --- a/remix-lib/src/execution/txRunner.js +++ b/remix-lib/src/execution/txRunner.js @@ -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 = {} diff --git a/remix-simulator/src/genesis.js b/remix-simulator/src/genesis.js index 2d4d7e74ee..5647db3296 100644 --- a/remix-simulator/src/genesis.js +++ b/remix-simulator/src/genesis.js @@ -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)