diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-25 18:55:00 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 18:51:25 +0800 |
commit | f97b8033c8c79f133417805fdd84bc1c36a36089 (patch) | |
tree | 26a45a01eac49db6758cf0e3dda5d1d1a57978f2 /dex/backend.go | |
parent | 5966f431920a13294b0d867285d5e0d28b5ee470 (diff) | |
download | dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.gz dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.bz2 dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.lz dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.xz dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.tar.zst dexon-f97b8033c8c79f133417805fdd84bc1c36a36089.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, |