mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 13:46: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
|
|
@ -10,13 +10,24 @@ import (
|
||||||
|
|
||||||
// ChainID
|
// ChainID
|
||||||
var ChainID = Define(T[*big.Int]{
|
var ChainID = Define(T[*big.Int]{
|
||||||
Name: "chainId",
|
Name: "chainId",
|
||||||
Validate: func(v *big.Int, cfg *Config2) error {
|
Optional: false,
|
||||||
if v.Sign() <= 0 {
|
Validate: validateChainID,
|
||||||
return fmt.Errorf("invalid chainID value %v", v)
|
})
|
||||||
}
|
|
||||||
return nil
|
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
|
// TerminalTotalDifficulty (TTD) is the total difficulty value where
|
||||||
|
|
@ -56,11 +67,3 @@ func validateBlobSchedule(schedule map[forks.Fork]BlobConfig, cfg *Config2) erro
|
||||||
}
|
}
|
||||||
return nil
|
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