diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-03 13:42:13 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-07 18:45:19 +0800 |
commit | 2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3 (patch) | |
tree | 84a766279fb1e4ebb1747eea1a35b47634d98f6b /eth/backend.go | |
parent | c942700427557e3ff6de3aaf6b916e2f056c1ec2 (diff) | |
download | dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.gz dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.bz2 dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.lz dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.xz dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.tar.zst dexon-2ef3c724030f7f5bd53c1a45d6c40b69bfc609c3.zip |
Add initial DEXON consensus engine implementation skeleton
Diffstat (limited to 'eth/backend.go')
-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) } |