allow e2e to work for out of process app

This commit is contained in:
William Banfield
2022-07-15 16:57:42 -04:00
parent 223ece93c8
commit 00dd3a6801
4 changed files with 31 additions and 2 deletions
+18 -1
View File
@@ -112,7 +112,24 @@ func startApp(cfg *Config) error {
return err
}
logger.Info("start app", "msg", log.NewLazySprintf("Server listening on %v (%v protocol)", cfg.Listen, cfg.Protocol))
return nil
tmcfg, nodeLogger, nodeKey, err := setupNode()
if err != nil {
return fmt.Errorf("failed to setup config: %w", err)
}
n, err := node.NewNode(tmcfg,
privval.LoadOrGenFilePV(tmcfg.PrivValidatorKeyFile(), tmcfg.PrivValidatorStateFile()),
nodeKey,
proxy.NewRemoteClientCreator(cfg.Listen, cfg.Protocol, true),
node.DefaultGenesisDocProviderFunc(tmcfg),
node.DefaultDBProvider,
node.DefaultMetricsProvider(tmcfg.Instrumentation),
nodeLogger,
)
if err != nil {
return err
}
return n.Start()
}
// startNode starts a Tendermint node running the application directly. It assumes the Tendermint