aboutsummaryrefslogtreecommitdiffstats
path: root/params/config.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-14 19:59:57 +0800
committerGitHub <noreply@github.com>2019-01-14 19:59:57 +0800
commit5823540202423aed2cbdf8c125e95d8b1a20e245 (patch)
treeca6bc0f54e7fe5533b8bfad0c6a4b8f92064afbb /params/config.go
parent16c11a809e8bdc047dca151821cd1542c81624f2 (diff)
downloaddexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.gz
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.tar.zst
dexon-5823540202423aed2cbdf8c125e95d8b1a20e245.zip
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'params/config.go')
-rw-r--r--params/config.go14
1 files changed, 10 insertions, 4 deletions
diff --git a/params/config.go b/params/config.go
index 438cf80cf..f932cf92e 100644
--- a/params/config.go
+++ b/params/config.go
@@ -35,6 +35,7 @@ var (
// MainnetChainConfig is the chain parameters to run a node on the main network.
MainnetChainConfig = &ChainConfig{
ChainID: big.NewInt(237),
+ DMoment: 0,
HomesteadBlock: big.NewInt(0),
DAOForkBlock: big.NewInt(0),
DAOForkSupport: true,
@@ -82,6 +83,7 @@ var (
// TestnetChainConfig contains the chain parameters to run a node on the Taiwan test network.
TestnetChainConfig = &ChainConfig{
ChainID: big.NewInt(238),
+ DMoment: 1547462100,
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
@@ -119,6 +121,7 @@ var (
// TaipeiChainConfig contains the chain parameters to run a node on the Taipei test network.
TaipeiChainConfig = &ChainConfig{
ChainID: big.NewInt(239),
+ DMoment: 0,
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
@@ -167,23 +170,24 @@ var (
//
// This configuration is intentionally not using keyed fields to force anyone
// adding flags to the config to also have to set these fields.
- AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
+ AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), 0, big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
// and accepted by the Ethereum core developers into the Clique consensus.
//
// This configuration is intentionally not using keyed fields to force anyone
// adding flags to the config to also have to set these fields.
- AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil}
+ AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), 0, big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil}
- AllDexconProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(DexconConfig)}
+ AllDexconProtocolChanges = &ChainConfig{big.NewInt(1337), 0, big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, new(DexconConfig)}
- TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
+ TestChainConfig = &ChainConfig{big.NewInt(1), 0, big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, nil}
TestRules = TestChainConfig.Rules(new(big.Int))
// Ethereum MainnetChainConfig is the chain parameters to run a node on the main network.
EthereumMainnetChainConfig = &ChainConfig{
ChainID: big.NewInt(1),
+ DMoment: 0,
HomesteadBlock: big.NewInt(1150000),
DAOForkBlock: big.NewInt(1920000),
DAOForkSupport: true,
@@ -199,6 +203,7 @@ var (
// Ethereum TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
EthereumTestnetChainConfig = &ChainConfig{
ChainID: big.NewInt(3),
+ DMoment: 0,
HomesteadBlock: big.NewInt(0),
DAOForkBlock: nil,
DAOForkSupport: true,
@@ -231,6 +236,7 @@ type TrustedCheckpoint struct {
// set of configuration options.
type ChainConfig struct {
ChainID *big.Int `json:"chainId"` // chainId identifies the current chain and is used for replay protection
+ DMoment uint64 `json:"dMoment"` // dMoment which indicate the starting time of the network
HomesteadBlock *big.Int `json:"homesteadBlock,omitempty"` // Homestead switch block (nil = no fork, 0 = already homestead)