cmd/utils: set temporary HF number
This commit is contained in:
parent
4dca5d4db7
commit
ae33883c2f
@ -853,22 +853,37 @@ func MakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *params.ChainCon
|
|||||||
}
|
}
|
||||||
config.DAOForkSupport = true
|
config.DAOForkSupport = true
|
||||||
}
|
}
|
||||||
|
if config.EIP150Block == nil {
|
||||||
|
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||||
|
config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
|
||||||
|
} else {
|
||||||
|
config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if config.EIP150Hash == (common.Hash{}) {
|
||||||
|
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||||
|
config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
|
||||||
|
} else {
|
||||||
|
config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if config.EIP155Block == nil {
|
||||||
|
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||||
|
config.EIP150Block = params.TestNetSpuriousDragon
|
||||||
|
} else {
|
||||||
|
config.EIP155Block = params.MainNetSpuriousDragon
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if config.EIP158Block == nil {
|
||||||
|
if ctx.GlobalBool(TestNetFlag.Name) {
|
||||||
|
config.EIP158Block = params.TestNetSpuriousDragon
|
||||||
|
} else {
|
||||||
|
config.EIP158Block = params.MainNetSpuriousDragon
|
||||||
|
}
|
||||||
|
}
|
||||||
config.DAOForkSupport = true
|
config.DAOForkSupport = true
|
||||||
}
|
}
|
||||||
if config.EIP150Block == nil {
|
|
||||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
|
||||||
config.EIP150Block = params.TestNetHomesteadGasRepriceBlock
|
|
||||||
} else {
|
|
||||||
config.EIP150Block = params.MainNetHomesteadGasRepriceBlock
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if config.EIP150Hash == (common.Hash{}) {
|
|
||||||
if ctx.GlobalBool(TestNetFlag.Name) {
|
|
||||||
config.EIP150Hash = params.TestNetHomesteadGasRepriceHash
|
|
||||||
} else {
|
|
||||||
config.EIP150Hash = params.MainNetHomesteadGasRepriceHash
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Force override any existing configs if explicitly requested
|
// Force override any existing configs if explicitly requested
|
||||||
switch {
|
switch {
|
||||||
case ctx.GlobalBool(SupportDAOFork.Name):
|
case ctx.GlobalBool(SupportDAOFork.Name):
|
||||||
|
@ -34,4 +34,7 @@ var (
|
|||||||
|
|
||||||
TestNetHomesteadGasRepriceHash = common.HexToHash("0xf376243aeff1f256d970714c3de9fd78fa4e63cf63e32a51fe1169e375d98145") // Testnet gas reprice block hash (used by fast sync)
|
TestNetHomesteadGasRepriceHash = common.HexToHash("0xf376243aeff1f256d970714c3de9fd78fa4e63cf63e32a51fe1169e375d98145") // Testnet gas reprice block hash (used by fast sync)
|
||||||
MainNetHomesteadGasRepriceHash = common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0") // Mainnet gas reprice block hash (used by fast sync)
|
MainNetHomesteadGasRepriceHash = common.HexToHash("0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0") // Mainnet gas reprice block hash (used by fast sync)
|
||||||
|
|
||||||
|
TestNetSpuriousDragon = big.NewInt(3000000)
|
||||||
|
MainNetSpuriousDragon = big.NewInt(3000000)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user