mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
func CopyConstants choose local chain if unknown chainID
This commit is contained in:
parent
a1e5a98377
commit
ae696dc547
3 changed files with 15 additions and 7 deletions
|
|
@ -231,6 +231,14 @@ func (w *wizard) makeGenesis() {
|
|||
genesis.Config.XDPoS.V2.CurrentConfig.CertThreshold = w.readDefaultFloat(0.667)
|
||||
}
|
||||
genesis.Config.XDPoS.V2.CurrentConfig.MaxMasternodes = 108
|
||||
//TODO: config to add after rewards upgrade enabled
|
||||
// genesis.Config.XDPoS.V2.CurrentConfig.MaxProtectornodes
|
||||
// genesis.Config.XDPoS.V2.CurrentConfig.MaxObservernodes
|
||||
// genesis.Config.XDPoS.V2.CurrentConfig.MinProtectornodes
|
||||
// genesis.Config.XDPoS.V2.CurrentConfig.MasternodeReward
|
||||
// genesis.Config.XDPoS.V2.CurrentConfig.ProtectornodeReward
|
||||
// genesis.Config.XDPoS.V2.CurrentConfig.ObservernodeReward
|
||||
|
||||
genesis.Config.XDPoS.V2.AllConfigs[0] = genesis.Config.XDPoS.V2.CurrentConfig
|
||||
|
||||
fmt.Println()
|
||||
|
|
|
|||
|
|
@ -128,15 +128,15 @@ func IsInBlacklist(address *Address) bool {
|
|||
// It skips mainnet since the default value is from mainnet.
|
||||
func CopyConstants(chainID uint64) {
|
||||
var c *constant
|
||||
if chainID == TestnetConstant.chainID {
|
||||
if chainID == MaintnetConstant.chainID {
|
||||
return
|
||||
} else if chainID == TestnetConstant.chainID {
|
||||
c = &TestnetConstant
|
||||
IsTestnet = true
|
||||
} else if chainID == DevnetConstant.chainID {
|
||||
c = &DevnetConstant
|
||||
} else if chainID == localConstant.chainID {
|
||||
} else { // local custom chain, it can have any chainID
|
||||
c = &localConstant
|
||||
} else {
|
||||
return
|
||||
}
|
||||
|
||||
MaxMasternodesV2 = c.maxMasternodesV2
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ var localConstant = constant{
|
|||
tipXDCXReceiverDisable: big.NewInt(0),
|
||||
eip1559Block: big.NewInt(0),
|
||||
cancunBlock: big.NewInt(0),
|
||||
tipUpgradeReward: big.NewInt(0),
|
||||
tipUpgradePenalty: big.NewInt(0),
|
||||
tipEpochHalving: big.NewInt(0),
|
||||
tipUpgradeReward: big.NewInt(999999999),
|
||||
tipUpgradePenalty: big.NewInt(999999999),
|
||||
tipEpochHalving: big.NewInt(999999999),
|
||||
|
||||
trc21IssuerSMC: HexToAddress("0x8c0faeb5C6bEd2129b8674F262Fd45c4e9468bee"),
|
||||
xdcxListingSMC: HexToAddress("0xDE34dD0f536170993E8CFF639DdFfCF1A85D3E53"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue