Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Explicitly initialize Common instances with chainstart HF #113

Merged
merged 2 commits into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ async function run () {
const syncDirName = args.syncmode === 'light' ? 'lightchaindata' : 'chaindata'
const networkDirName = args.network === 'mainnet' ? '' : `${args.network}/`
const chainParams = args.params ? await parse.params(args.params) : args.network
const common = new Common(chainParams)
// Initialize Common with an explicit 'chainstart' HF set until
// hardfork awareness is implemented within the library
// Also a fix for https://github.com/ethereumjs/ethereumjs-vm/issues/757
const common = new Common(chainParams, 'chainstart')
const servers = parse.transports(args.transports).map(t => {
const Server = serverFromName(t.name)
if (t.name === 'rlpx') {
Expand Down
2 changes: 1 addition & 1 deletion lib/blockchain/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const promisify = require('util-promisify')

const defaultOptions = {
logger: defaultLogger,
common: new Common('mainnet')
common: new Common('mainnet', 'chainstart')
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/service/ethereumservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Common = require('ethereumjs-common').default

const defaultOptions = {
lightserv: false,
common: new Common('mainnet'),
common: new Common('mainnet', 'chainstart'),
minPeers: 3,
timeout: 5000,
interval: 1000
Expand Down