I'm generating a new blockchain in a master container, then after the params.dat gets transferred to the peer container (through connecting), it is served to another container with multichain cold and my public API inside. Once the params are written to the correct directory it attempts to start multichain cold.
Sometimes I get the error "Incorrect or no genesis block found. Wrong datadir for network?". Sometimes it starts correctly. I don't see how it can be a race condition in writing the params, because I have verified with hashes that the params have been copied correctly before I start the daemon.
Can you give me more information on this error? Why is multichain cold looking for a genesis block? Why is it looking for a datadir when it has no networking capabilities, so should be basically stateless right?
I'm sorry I ask so many questions but I am working on a big multichain project, so I'm constantly running into stuff.
This is my code so you should see that the params are written before I try to start the cold daemon (there is no concurrency or deferred functions in the GetParams method):
if err := app.GetParams(); err != nil { panic(err) }
cmd := exec.Command("multichaind-cold", CONST_CHAIN_NAME, "-http")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
fmt.Println("Running multichaind-cold and waiting for it to finish...")
err := cmd.Run()
fmt.Printf("Command finished with error: %v\n", err)
Thanks