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 /swarm/storage/netstore.go | |
parent | 1dc19de5da64962a98a37bbc7b93a3895d2eb6e6 (diff) | |
parent | 32516c768ec09e2a71cab5983d2c8b8ae5d92fc7 (diff) | |
download | go-tangerine-19982f946735948478b6b7e7706f1b615f171d0d.tar go-tangerine-19982f946735948478b6b7e7706f1b615f171d0d.tar.gz go-tangerine-19982f946735948478b6b7e7706f1b615f171d0d.tar.bz2 go-tangerine-19982f946735948478b6b7e7706f1b615f171d0d.tar.lz go-tangerine-19982f946735948478b6b7e7706f1b615f171d0d.tar.xz go-tangerine-19982f946735948478b6b7e7706f1b615f171d0d.tar.zst go-tangerine-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 'swarm/storage/netstore.go')
-rw-r--r-- | swarm/storage/netstore.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/swarm/storage/netstore.go b/swarm/storage/netstore.go index 7b0612edc..5d4f17deb 100644 --- a/swarm/storage/netstore.go +++ b/swarm/storage/netstore.go @@ -57,15 +57,21 @@ type StoreParams struct { Radius int } -func NewStoreParams(path string) (self *StoreParams) { +//create params with default values +func NewDefaultStoreParams() (self *StoreParams) { return &StoreParams{ - ChunkDbPath: filepath.Join(path, "chunks"), DbCapacity: defaultDbCapacity, CacheCapacity: defaultCacheCapacity, Radius: defaultRadius, } } +//this can only finally be set after all config options (file, cmd line, env vars) +//have been evaluated +func (self *StoreParams) Init(path string) { + self.ChunkDbPath = filepath.Join(path, "chunks") +} + // netstore contructor, takes path argument that is used to initialise dbStore, // the persistent (disk) storage component of LocalStore // the second argument is the hive, the connection/logistics manager for the node |