diff options
author | Yondon Fu <yondon.fu@gmail.com> | 2017-12-19 06:17:41 +0800 |
---|---|---|
committer | Yondon Fu <yondon.fu@gmail.com> | 2017-12-19 06:17:41 +0800 |
commit | 3857cdc267e3192697f561df0a0f827f65dfb6b5 (patch) | |
tree | 401c52c4972a68229ea283a394a0b0a5f3cfdc8e /eth/config.go | |
parent | a5330fe0c569b75cb8a524f60f7e8dc06498262b (diff) | |
parent | fe070ab5c32702033489f1b9d1655ea1b894c29e (diff) | |
download | dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.tar dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.tar.gz dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.tar.bz2 dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.tar.lz dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.tar.xz dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.tar.zst dexon-3857cdc267e3192697f561df0a0f827f65dfb6b5.zip |
Merge branch 'master' into abi-offset-fixed-arrays
Diffstat (limited to 'eth/config.go')
-rw-r--r-- | eth/config.go | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/eth/config.go b/eth/config.go index 7bcfd403e..383cd6783 100644 --- a/eth/config.go +++ b/eth/config.go @@ -25,6 +25,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/consensus/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/eth/gasprice" @@ -33,16 +34,18 @@ import ( // DefaultConfig contains default settings for use on the Ethereum main net. var DefaultConfig = Config{ - SyncMode: downloader.FastSync, - EthashCacheDir: "ethash", - EthashCachesInMem: 2, - EthashCachesOnDisk: 3, - EthashDatasetsInMem: 1, - EthashDatasetsOnDisk: 2, - NetworkId: 1, - LightPeers: 20, - DatabaseCache: 128, - GasPrice: big.NewInt(18 * params.Shannon), + SyncMode: downloader.FastSync, + Ethash: ethash.Config{ + CacheDir: "ethash", + CachesInMem: 2, + CachesOnDisk: 3, + DatasetsInMem: 1, + DatasetsOnDisk: 2, + }, + NetworkId: 1, + LightPeers: 20, + DatabaseCache: 128, + GasPrice: big.NewInt(18 * params.Shannon), TxPool: core.DefaultTxPoolConfig, GPO: gasprice.Config{ @@ -59,9 +62,9 @@ func init() { } } if runtime.GOOS == "windows" { - DefaultConfig.EthashDatasetDir = filepath.Join(home, "AppData", "Ethash") + DefaultConfig.Ethash.DatasetDir = filepath.Join(home, "AppData", "Ethash") } else { - DefaultConfig.EthashDatasetDir = filepath.Join(home, ".ethash") + DefaultConfig.Ethash.DatasetDir = filepath.Join(home, ".ethash") } } @@ -92,12 +95,7 @@ type Config struct { GasPrice *big.Int // Ethash options - EthashCacheDir string - EthashCachesInMem int - EthashCachesOnDisk int - EthashDatasetDir string - EthashDatasetsInMem int - EthashDatasetsOnDisk int + Ethash ethash.Config // Transaction pool options TxPool core.TxPoolConfig @@ -109,10 +107,7 @@ type Config struct { EnablePreimageRecording bool // Miscellaneous options - DocRoot string `toml:"-"` - PowFake bool `toml:"-"` - PowTest bool `toml:"-"` - PowShared bool `toml:"-"` + DocRoot string `toml:"-"` } type configMarshaling struct { |