aboutsummaryrefslogtreecommitdiffstats
path: root/swarm/network/syncer.go
diff options
context:
space:
mode:
Diffstat (limited to 'swarm/network/syncer.go')
-rw-r--r--swarm/network/syncer.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/swarm/network/syncer.go b/swarm/network/syncer.go
index d76af022c..6d729fcb9 100644
--- a/swarm/network/syncer.go
+++ b/swarm/network/syncer.go
@@ -131,9 +131,8 @@ type SyncParams struct {
}
// constructor with default values
-func NewSyncParams(bzzdir string) *SyncParams {
+func NewDefaultSyncParams() *SyncParams {
return &SyncParams{
- RequestDbPath: filepath.Join(bzzdir, "requests"),
RequestDbBatchSize: requestDbBatchSize,
KeyBufferSize: keyBufferSize,
SyncBufferSize: syncBufferSize,
@@ -144,6 +143,12 @@ func NewSyncParams(bzzdir string) *SyncParams {
}
}
+//this can only finally be set after all config options (file, cmd line, env vars)
+//have been evaluated
+func (self *SyncParams) Init(path string) {
+ self.RequestDbPath = filepath.Join(path, "requests")
+}
+
// syncer is the agent that manages content distribution/storage replication/chunk storeRequest forwarding
type syncer struct {
*SyncParams // sync parameters