diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-03 13:42:13 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:48 +0800 |
commit | 41fd54a53f30f860953d76c90056a9c867aa803f (patch) | |
tree | 954273035de9891af21c81f63de9865d83810e52 /eth | |
parent | 14ae1246b789dd2a0a2bd22f0c7d3256daa26759 (diff) | |
download | dexon-41fd54a53f30f860953d76c90056a9c867aa803f.tar.gz dexon-41fd54a53f30f860953d76c90056a9c867aa803f.tar.zst dexon-41fd54a53f30f860953d76c90056a9c867aa803f.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) } |