diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-01-14 19:59:57 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:21 +0800 |
commit | 2b03b31d46e166e70ea82b806db47bb6408282e3 (patch) | |
tree | 9f26d62978a5de14078d7e50ddb6714c8996533a /params/config.go | |
parent | dca26d3e73ea1657cb7daa2086b74250adbbd85f (diff) | |
download | go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.gz go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.bz2 go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.lz go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.xz go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.tar.zst go-tangerine-2b03b31d46e166e70ea82b806db47bb6408282e3.zip |
params: write dMoment into ChainConfig (#150)
Diffstat (limited to 'params/config.go')
-rw-r--r-- | params/config.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/params/config.go b/params/config.go index fd7bac275..843ffdc92 100644 --- a/params/config.go +++ b/params/config.go @@ -41,6 +41,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, @@ -89,6 +90,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, @@ -127,6 +129,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, @@ -176,23 +179,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), 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), 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), 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), 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), 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), 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), 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), 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, @@ -208,6 +212,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, @@ -240,6 +245,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) |