Set the genesis command earlier in the startup, to ensure it does not affect any testing
@@ -74,6 +74,9 @@ type Config struct {
func main() {
switchToUpdatedVersion()
+
+ wavelet.SetGenesisByNetwork(sys.VersionMeta)
+
Run(os.Args, os.Stdin, os.Stdout, false)
}
@@ -297,8 +300,6 @@ func start(cfg *Config, stdin io.ReadCloser, stdout io.Writer) {
log.SetLevel(cfg.LogLevel)
logger := log.Node()
- wavelet.SetGenesisByNetwork(sys.VersionMeta)
-
listener, err := net.Listen("tcp", fmt.Sprintf(":%d", cfg.Port))
if err != nil {
logger.Fatal().Err(err).Msgf("Failed to listen to port %d.", cfg.Port)
