Skip to content

Commit

Permalink
Merge pull request #403 from ava-labs/use-data-dir-flag
Browse files Browse the repository at this point in the history
Use data dir flag
  • Loading branch information
felipemadero authored Jan 11, 2023
2 parents 26952b9 + 1ee4cd2 commit 750fe59
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions local/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,12 @@ func (ln *localNetwork) buildFlags(
return buildFlagsReturn{}, err
}

// Tell the node to put all node related data in [nodeDir] unless given in config file
dataDir, err := getConfigEntry(nodeConfig.Flags, configFile, config.DataDirKey, nodeDir)
if err != nil {
return buildFlagsReturn{}, err
}

// pluginDir from all configs for node
pluginDir, err := getConfigEntry(nodeConfig.Flags, configFile, config.PluginDirKey, "")
if err != nil {
Expand Down Expand Up @@ -965,6 +971,7 @@ func (ln *localNetwork) buildFlags(
// Flags for AvalancheGo
flags := []string{
fmt.Sprintf("--%s=%d", config.NetworkNameKey, ln.networkID),
fmt.Sprintf("--%s=%s", config.DataDirKey, dataDir),
fmt.Sprintf("--%s=%s", config.DBPathKey, dbDir),
fmt.Sprintf("--%s=%s", config.LogsDirKey, logsDir),
fmt.Sprintf("--%s=%d", config.HTTPPortKey, apiPort),
Expand Down

0 comments on commit 750fe59

Please sign in to comment.