Skip to content

Commit

Permalink
fix: add p2p peers to dymint config
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs committed Oct 13, 2024
1 parent 4fde0ff commit abf0d7e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/rollapp/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,20 @@ func Cmd() *cobra.Command {
pterm.Warning.Println(
"none of the sequencers provide p2p seed nodes this node will sync only from DA",
)
} else {
peers := strings.Join(peers, ",")
fieldsToUpdate := map[string]string{
"p2p_bootstrap_nodes": peers,
"p2p_persistent_nodes": peers,
}
dymintFilePath := sequencer.GetDymintFilePath(rollappConfig.Home)

for k, v := range fieldsToUpdate {
err := tomlconfig.UpdateFieldInFile(dymintFilePath, k, v)
if err != nil {
pterm.Warning.Println("failed to add p2p peers: ", err)
}
}
}

// approve the data directory deletion before downloading the snapshot,
Expand Down

0 comments on commit abf0d7e

Please sign in to comment.