diff options
author | Janos Guljas <janos@resenje.org> | 2017-12-13 17:23:11 +0800 |
---|---|---|
committer | Janos Guljas <janos@resenje.org> | 2017-12-13 17:40:39 +0800 |
commit | 19982f946735948478b6b7e7706f1b615f171d0d (patch) | |
tree | cbacbdb6f9e6e731c2ebc17bad74e875f4d8ea8b /eth/config.go | |
parent | 1dc19de5da64962a98a37bbc7b93a3895d2eb6e6 (diff) | |
parent | 32516c768ec09e2a71cab5983d2c8b8ae5d92fc7 (diff) | |
download | dexon-19982f946735948478b6b7e7706f1b615f171d0d.tar dexon-19982f946735948478b6b7e7706f1b615f171d0d.tar.gz dexon-19982f946735948478b6b7e7706f1b615f171d0d.tar.bz2 dexon-19982f946735948478b6b7e7706f1b615f171d0d.tar.lz dexon-19982f946735948478b6b7e7706f1b615f171d0d.tar.xz dexon-19982f946735948478b6b7e7706f1b615f171d0d.tar.zst dexon-19982f946735948478b6b7e7706f1b615f171d0d.zip |
swarm, cmd/swarm: Merge branch 'master' into multiple-ens-endpoints
Merge with changes that implement config file PR #15548.
Field *EnsApi string* in swarm/api.Config is replaced with
*EnsAPIs []string*.
A new field *EnsDisabled bool* is added to swarm/api.Config for
easy way to disable ENS resolving with config file.
Signature of function swarm.NewSwarm is changed and simplified.
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 { |