diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-03 13:42:13 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:21:31 +0800 |
commit | 2e85d958c474b2dd0fbc1338767da5f86c3e9879 (patch) | |
tree | eb1387f05360d55d5eddfd3ea03ff7da775cd259 /params/config.go | |
parent | 4bcc0a37ab70cb79b16893556cffdaad6974e7d8 (diff) | |
download | go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.tar go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.tar.gz go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.tar.bz2 go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.tar.lz go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.tar.xz go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.tar.zst go-tangerine-2e85d958c474b2dd0fbc1338767da5f86c3e9879.zip |
Add initial DEXON consensus engine implementation skeleton
Diffstat (limited to 'params/config.go')
-rw-r--r-- | params/config.go | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/params/config.go b/params/config.go index c59c748ac..6085559aa 100644 --- a/params/config.go +++ b/params/config.go @@ -151,16 +151,16 @@ 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} + 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} // 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}} + 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} - 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} + 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} TestRules = TestChainConfig.Rules(new(big.Int)) ) @@ -204,6 +204,7 @@ type ChainConfig struct { // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` + Dexcon *DexconConfig `json:"dexcon,omitempty"` } // EthashConfig is the consensus engine configs for proof-of-work based sealing. @@ -225,6 +226,16 @@ func (c *CliqueConfig) String() string { return "clique" } +// DexconConfig is the consensus engine configs for DEXON consensus. +type DexconConfig struct { + GovernanceContractAddress string +} + +// String implements the stringer interface, returning the consensus engine details. +func (c *DexconConfig) String() string { + return "dexcon" +} + // String implements the fmt.Stringer interface. func (c *ChainConfig) String() string { var engine interface{} |