cmd/utils, core, params: explicitly pick reprice fork for fast sync

This commit is contained in:
Péter Szilágyi
2016-10-24 11:40:58 +03:00
parent 00665a0b72
commit 8639b0fae9
4 changed files with 32 additions and 7 deletions

View File

@ -804,6 +804,13 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *core.ChainConfi
config.HomesteadGasRepriceBlock = params.MainNetHomesteadGasRepriceBlock
}
}
if config.HomesteadGasRepriceHash == (common.Hash{}) {
if ctx.GlobalBool(TestNetFlag.Name) {
config.HomesteadGasRepriceHash = params.TestNetHomesteadGasRepriceHash
} else {
config.HomesteadGasRepriceHash = params.MainNetHomesteadGasRepriceHash
}
}
// Force override any existing configs if explicitly requested
switch {
case ctx.GlobalBool(SupportDAOFork.Name):