mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
params: move some code around
This commit is contained in:
parent
b25e44a841
commit
73710ff3c5
1 changed files with 18 additions and 15 deletions
|
|
@ -11,12 +11,23 @@ import (
|
|||
// ChainID
|
||||
var ChainID = Define(T[*big.Int]{
|
||||
Name: "chainId",
|
||||
Validate: func(v *big.Int, cfg *Config2) error {
|
||||
Optional: false,
|
||||
Validate: validateChainID,
|
||||
})
|
||||
|
||||
func validateChainID(v *big.Int, cfg *Config2) error {
|
||||
if v.Sign() <= 0 {
|
||||
return fmt.Errorf("invalid chainID value %v", v)
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
// DAOForkSupport is the chain parameter that configures the DAO fork.
|
||||
// true=supports or false=opposes the fork.
|
||||
// The default value is true.
|
||||
var DAOForkSupport = Define(T[bool]{
|
||||
Optional: true,
|
||||
Default: true,
|
||||
})
|
||||
|
||||
// TerminalTotalDifficulty (TTD) is the total difficulty value where
|
||||
|
|
@ -56,11 +67,3 @@ func validateBlobSchedule(schedule map[forks.Fork]BlobConfig, cfg *Config2) erro
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// DAOForkSupport is the chain parameter that configures the DAO fork.
|
||||
// true=supports or false=opposes the fork.
|
||||
// The default value is true.
|
||||
var DAOForkSupport = Define(T[bool]{
|
||||
Optional: true,
|
||||
Default: true,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue