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@byzantine-lab.io>2019-06-12 17:21:31 +0800
commit2ba220653fdf945844896458821808f2edd8f4af (patch)
tree5fb24eed28de25b59e12c7472a222f2a338e2f53 /dex/backend.go
parent94bb940818d9b5c6d654da14f13918e65cf84623 (diff)
downloadgo-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar
go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.gz
go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.bz2
go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.lz
go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.xz
go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.tar.zst
go-tangerine-2ba220653fdf945844896458821808f2edd8f4af.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,