aboutsummaryrefslogtreecommitdiffstats
path: root/dex/backend.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-09-25 18:55:00 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-07 18:45:19 +0800
commitbc5a3c35468c272869966176f98f3d5522f4b607 (patch)
tree563449e510ff69344e162c51ae6a8efde61e57a7 /dex/backend.go
parentee0c68dff2488af88b2c128bf5ac56410e6d740f (diff)
downloaddexon-bc5a3c35468c272869966176f98f3d5522f4b607.tar.gz
dexon-bc5a3c35468c272869966176f98f3d5522f4b607.tar.zst
dexon-bc5a3c35468c272869966176f98f3d5522f4b607.zip
Use dex.Config instead of eth.Config
Diffstat (limited to 'dex/backend.go')
-rw-r--r--dex/backend.go16
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,