aboutsummaryrefslogtreecommitdiffstats
path: root/params/config.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-09-03 13:42:13 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-07 18:45:19 +0800
commit2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3 (patch)
tree84a766279fb1e4ebb1747eea1a35b47634d98f6b /params/config.go
parentc942700427557e3ff6de3aaf6b916e2f056c1ec2 (diff)
downloaddexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.gz
dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.zst
dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.zip
Add initial DEXON consensus engine implementation skeleton
Diffstat (limited to 'params/config.go')
-rw-r--r--params/config.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/params/config.go b/params/config.go
index 44b2ffeba..73ecdcd8e 100644
--- a/params/config.go
+++ b/params/config.go
@@ -141,16 +141,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))
)
@@ -194,6 +194,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.
@@ -215,6 +216,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{}