Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use data dir flag #403

Merged
merged 2 commits into from
Jan 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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),
dasconnor marked this conversation as resolved.
Show resolved Hide resolved
fmt.Sprintf("--%s=%s", config.DBPathKey, dbDir),
fmt.Sprintf("--%s=%s", config.LogsDirKey, logsDir),
fmt.Sprintf("--%s=%d", config.HTTPPortKey, apiPort),
Expand Down