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 /eth | |
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 'eth')
-rw-r--r-- | eth/backend.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eth/backend.go b/eth/backend.go index 2a9d56c5c..19f48662d 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -30,6 +30,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/consensus/clique" + "github.com/ethereum/go-ethereum/consensus/dexcon" "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/bloombits" @@ -224,6 +225,10 @@ func CreateDB(ctx *node.ServiceContext, config *Config, name string) (ethdb.Data // CreateConsensusEngine creates the required type of consensus engine instance for an Ethereum service func CreateConsensusEngine(ctx *node.ServiceContext, chainConfig *params.ChainConfig, config *ethash.Config, notify []string, noverify bool, db ethdb.Database) consensus.Engine { // If proof-of-authority is requested, set it up + if chainConfig.Dexcon != nil { + return dexcon.New(chainConfig.Dexcon) + } + // If proof-of-authority is requested, set it up if chainConfig.Clique != nil { return clique.New(chainConfig.Clique, db) } |