aboutsummaryrefslogtreecommitdiffstats
path: root/eth/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/config.go')
-rw-r--r--eth/config.go39
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 {