Skip to content

Commit ec4731e

Browse files
committed
impv: continue initia init initialization
1 parent a4a4660 commit ec4731e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

models/weaveinit/run_l1_node.go

+17
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"path/filepath"
88
"runtime"
99
"sort"
10+
"strconv"
1011
"strings"
1112
"time"
1213

@@ -762,6 +763,22 @@ func initializeApp(state *RunL1NodeState) tea.Cmd {
762763
}
763764
}
764765

766+
if err := utils.UpdateTomlValue(filepath.Join(utils.InitiaConfigDirectory, "app.toml"), "minimum-gas-prices", state.minGasPrice); err != nil {
767+
panic(fmt.Sprintf("failed to update minimum-gas-prices: %v", err))
768+
}
769+
770+
if err := utils.UpdateTomlValue(filepath.Join(utils.InitiaConfigDirectory, "app.toml"), "api.enable", strconv.FormatBool(state.enableLCD)); err != nil {
771+
panic(fmt.Sprintf("failed to update api enable: %v", err))
772+
}
773+
774+
if err := utils.UpdateTomlValue(filepath.Join(utils.InitiaConfigDirectory, "config.toml"), "p2p.seeds", state.seeds); err != nil {
775+
panic(fmt.Sprintf("failed to update seeds: %v", err))
776+
}
777+
778+
if err := utils.UpdateTomlValue(filepath.Join(utils.InitiaConfigDirectory, "config.toml"), "p2p.persistent_peers", state.persistentPeers); err != nil {
779+
panic(fmt.Sprintf("failed to update persistent_peers: %v", err))
780+
}
781+
765782
return utils.EndLoading{}
766783
}
767784
}

0 commit comments

Comments
 (0)