|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
'use strict' |
|
|
|
|
import BN from 'bn.js' |
|
|
|
|
import { RunBlockResult, RunTxResult } from '@ethereumjs/vm' |
|
|
|
|
import { ConsensusType } from '@ethereumjs/common' |
|
|
|
|
import { Transaction, FeeMarketEIP1559Transaction } from '@ethereumjs/tx' |
|
|
|
|
import { Block } from '@ethereumjs/block' |
|
|
|
|
import { bufferToHex, Address } from '@ethereumjs/util' |
|
|
|
@ -106,13 +106,14 @@ export class TxRunnerVM { |
|
|
|
|
|
|
|
|
|
const coinbases = ['0x0e9281e9c6a0808672eaba6bd1220e144c9bb07a', '0x8945a1288dc78a6d8952a92c77aee6730b414778', '0x94d76e24f818426ae84aa404140e8d5f60e10e7e'] |
|
|
|
|
const difficulties = [69762765929000, 70762765929000, 71762765929000] |
|
|
|
|
const difficulty = this.commonContext.consensusType() === ConsensusType.ProofOfStake ? 0 : difficulties[self.blockNumber % difficulties.length] |
|
|
|
|
|
|
|
|
|
const block = Block.fromBlockData({ |
|
|
|
|
header: { |
|
|
|
|
timestamp: new Date().getTime() / 1000 | 0, |
|
|
|
|
number: self.blockNumber, |
|
|
|
|
coinbase: coinbases[self.blockNumber % coinbases.length], |
|
|
|
|
difficulty: difficulties[self.blockNumber % difficulties.length], |
|
|
|
|
difficulty, |
|
|
|
|
gasLimit, |
|
|
|
|
baseFeePerGas: EIP1559 ? '0x1' : undefined |
|
|
|
|
}, |
|
|
|
|