Skip to content

Commit 405df15

Browse files
committed
impv: download genesis from source
1 parent d36e9dd commit 405df15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

models/weaveinit/run_l1_node.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -782,11 +782,13 @@ func initializeApp(state *RunL1NodeState) tea.Cmd {
782782
}
783783

784784
if state.genesisEndpoint != "" {
785-
if err := utils.DownloadFile(filepath.Join(utils.WeaveDataDirectory, "genesis.json"), state.genesisEndpoint); err != nil {
785+
if err := utils.DownloadFile(state.genesisEndpoint, filepath.Join(weaveDataPath, "genesis.json")); err != nil {
786786
panic(fmt.Sprintf("failed to download genesis.json: %v", err))
787787
}
788788

789-
// TODO: Continue with the rest of the genesis.json setup
789+
if err := os.Rename(filepath.Join(weaveDataPath, "genesis.json"), filepath.Join(initiaConfigPath, "genesis.json")); err != nil {
790+
panic(fmt.Sprintf("failed to move genesis.json: %v", err))
791+
}
790792
}
791793

792794
return utils.EndLoading{}

0 commit comments

Comments
 (0)