aboutsummaryrefslogtreecommitdiffstats
path: root/dex/config.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>2018-12-19 20:54:27 +0800
commitc1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b (patch)
treefd6e0d823a019c871669f4c07d664769c851f151 /dex/config.go
parentfdd1b2900392b4ecf089b89d88b563430e18d4b0 (diff)
downloaddexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.tar
dexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.tar.gz
dexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.tar.bz2
dexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.tar.lz
dexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.tar.xz
dexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.tar.zst
dexon-c1d8ff3295b2b9b4b89cf04dcd8199ef1434ab1b.zip
dex: bug fix to allow running geth without crashing
Diffstat (limited to 'dex/config.go')
-rw-r--r--dex/config.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/dex/config.go b/dex/config.go
index 3afbf5db1..507ccf5e3 100644
--- a/dex/config.go
+++ b/dex/config.go
@@ -18,6 +18,7 @@ package dex
import (
"crypto/ecdsa"
+ "math/big"
"os"
"os/user"
"path/filepath"
@@ -28,6 +29,7 @@ import (
"github.com/dexon-foundation/dexon/core"
"github.com/dexon-foundation/dexon/dex/gasprice"
"github.com/dexon-foundation/dexon/eth/downloader"
+ "github.com/dexon-foundation/dexon/params"
)
// DefaultConfig contains default settings for use on the Ethereum main net.
@@ -46,7 +48,7 @@ var DefaultConfig = Config{
Blocks: 20,
Percentile: 60,
},
-
+ DefaultGasPrice: big.NewInt(params.GWei),
GasFloor: 8000000,
GasCeil: 8000000,
GasLimitTolerance: 1000000,
@@ -95,6 +97,7 @@ type Config struct {
TrieTimeout time.Duration
// For calculate gas limit
+ DefaultGasPrice *big.Int
GasFloor uint64
GasCeil uint64
GasLimitTolerance uint64