aboutsummaryrefslogtreecommitdiffstats
path: root/dex/backend.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-13 16:21:51 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:23:39 +0800
commit2c808da2a4e8b7c4801efef67a5b4bb91e392357 (patch)
tree5b0ed7f4ac291c33f976266f270ad1c37e4cf76b /dex/backend.go
parente06704eba85a4c6136b024d636012259a3f9952a (diff)
downloadgo-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.tar
go-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.tar.gz
go-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.tar.bz2
go-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.tar.lz
go-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.tar.xz
go-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.tar.zst
go-tangerine-2c808da2a4e8b7c4801efef67a5b4bb91e392357.zip
dex: bug fix to allow running geth without crashing
Diffstat (limited to 'dex/backend.go')
-rw-r--r--dex/backend.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/dex/backend.go b/dex/backend.go
index 2b4db94c4..d01ab8040 100644
--- a/dex/backend.go
+++ b/dex/backend.go
@@ -108,11 +108,14 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) {
}
dex := &Dexon{
config: config,
+ chainDb: chainDb,
+ chainConfig: chainConfig,
eventMux: ctx.EventMux,
accountManager: ctx.AccountManager,
shutdownChan: make(chan bool),
networkID: config.NetworkId,
bloomRequests: make(chan chan *bloombits.Retrieval),
+ bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks, params.BloomConfirms),
network: network,
blockdb: db,
engine: dexcon.New(&params.DexconConfig{}),
@@ -143,9 +146,9 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) {
dex.APIBackend = &DexAPIBackend{dex, nil}
gpoParams := config.GPO
- //if gpoParams.Default == nil {
- // gpoParams.Default = config.MinerGasPrice
- //}
+ if gpoParams.Default == nil {
+ gpoParams.Default = config.DefaultGasPrice
+ }
dex.APIBackend.gpo = gasprice.NewOracle(dex.APIBackend, gpoParams)
dex.governance = NewDexconGovernance(dex.APIBackend, dex.chainConfig, config.PrivateKey)