diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-25 18:55:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:48 +0800 |
commit | 953e13b21b0aae335ef655a1907a8883f1ba7be2 (patch) | |
tree | 21e929fc76c53cd61593673368e5187d62eac2e0 /dex/backend.go | |
parent | b05f0240d48ba0c0c3f9cb1fec948b05733f2ba3 (diff) | |
download | dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.tar dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.tar.gz dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.tar.bz2 dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.tar.lz dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.tar.xz dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.tar.zst dexon-953e13b21b0aae335ef655a1907a8883f1ba7be2.zip |
Use dex.Config instead of eth.Config
Diffstat (limited to 'dex/backend.go')
-rw-r--r-- | dex/backend.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/dex/backend.go b/dex/backend.go index c313f590b..1da083984 100644 --- a/dex/backend.go +++ b/dex/backend.go @@ -18,20 +18,15 @@ package dex import ( - "math/big" - "sync" - dexCore "github.com/dexon-foundation/dexon-consensus-core/core" "github.com/dexon-foundation/dexon-consensus-core/core/blockdb" ethCrypto "github.com/dexon-foundation/dexon-consensus-core/crypto/eth" "github.com/dexon-foundation/dexon/internal/ethapi" "github.com/ethereum/go-ethereum/accounts" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/consensus" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/bloombits" - "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/node" @@ -42,7 +37,7 @@ import ( // Dexon implementes the DEXON fullnode service. type Dexon struct { - config *eth.Config + config *Config chainConfig *params.ChainConfig // Channel for shutting down the service @@ -60,9 +55,6 @@ type Dexon struct { bloomRequests chan chan *bloombits.Retrieval // Channel receiving bloom data retrieval requests bloomIndexer *core.ChainIndexer // Bloom indexer operating during block imports - gasPrice *big.Int - etherbase common.Address - // Dexon consensus. app *DexconApp governance *DexconGovernance @@ -72,11 +64,9 @@ type Dexon struct { networkID uint64 netRPCService *ethapi.PublicNetAPI - - lock sync.RWMutex // Protects the variadic fields (e.g. gas price and etherbase) } -func New(ctx *node.ServiceContext, config *eth.Config) (*Dexon, error) { +func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { // Consensus. db, err := blockdb.NewLevelDBBackedBlockDB("main.blockdb") if err != nil { @@ -100,8 +90,6 @@ func New(ctx *node.ServiceContext, config *eth.Config) (*Dexon, error) { accountManager: ctx.AccountManager, shutdownChan: make(chan bool), networkID: config.NetworkId, - gasPrice: config.MinerGasPrice, - etherbase: config.Etherbase, bloomRequests: make(chan chan *bloombits.Retrieval), app: app, governance: gov, |