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@dexon.org>2019-03-12 12:19:09 +0800
commit5539dc25cee34d9018d789deed68c3b1ae8f3d47 (patch)
tree046c4c8ef89c9f393afa96e9a1e23b053b86b527 /dex/backend.go
parent40b1f02b48cd275b878e9c4308c4373f2c6329e2 (diff)
downloaddexon-5539dc25cee34d9018d789deed68c3b1ae8f3d47.tar.gz
dexon-5539dc25cee34d9018d789deed68c3b1ae8f3d47.tar.zst
dexon-5539dc25cee34d9018d789deed68c3b1ae8f3d47.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)