mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-26 18:04:22 +00:00
abci: Add unsynchronized local client (#9660)
* Remove extra interface cast Signed-off-by: Thane Thomson <connect@thanethomson.com> * Remove irrelevant comment Signed-off-by: Thane Thomson <connect@thanethomson.com> * abci: Add unsynchronized local client Signed-off-by: Thane Thomson <connect@thanethomson.com> * proxy: Add unsync local client creator Signed-off-by: Thane Thomson <connect@thanethomson.com> * e2e: Add sync app for use with unsync local client Signed-off-by: Thane Thomson <connect@thanethomson.com> * abci: Elaborate on mutex param in unsync local client Signed-off-by: Thane Thomson <connect@thanethomson.com> * proxy: Remove unnecessary comment Signed-off-by: Thane Thomson <connect@thanethomson.com> * abcicli: Remove unnecessary mutex param from unsync client Signed-off-by: Thane Thomson <connect@thanethomson.com> * ci/e2e: Explicitly use sync app for validator04 Signed-off-by: Thane Thomson <connect@thanethomson.com> * e2e: Ensure app is definitely the E2E app Signed-off-by: Thane Thomson <connect@thanethomson.com> Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
+17
-4
@@ -113,9 +113,22 @@ func startApp(cfg *Config) error {
|
||||
//
|
||||
// FIXME There is no way to simply load the configuration from a file, so we need to pull in Viper.
|
||||
func startNode(cfg *Config) error {
|
||||
app, err := app.NewApplication(cfg.App())
|
||||
if err != nil {
|
||||
return err
|
||||
var cc proxy.ClientCreator
|
||||
|
||||
if cfg.SyncApp {
|
||||
app, err := app.NewSyncApplication(cfg.App())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cc = proxy.NewUnsyncLocalClientCreator(app)
|
||||
logger.Info("Using synchronized app with unsynchronized local client")
|
||||
} else {
|
||||
app, err := app.NewApplication(cfg.App())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cc = proxy.NewLocalClientCreator(app)
|
||||
logger.Info("Using regular app with synchronized (regular) local client")
|
||||
}
|
||||
|
||||
tmcfg, nodeLogger, nodeKey, err := setupNode()
|
||||
@@ -126,7 +139,7 @@ func startNode(cfg *Config) error {
|
||||
n, err := node.NewNode(tmcfg,
|
||||
privval.LoadOrGenFilePV(tmcfg.PrivValidatorKeyFile(), tmcfg.PrivValidatorStateFile()),
|
||||
nodeKey,
|
||||
proxy.NewLocalClientCreator(app),
|
||||
cc,
|
||||
node.DefaultGenesisDocProviderFunc(tmcfg),
|
||||
node.DefaultDBProvider,
|
||||
node.DefaultMetricsProvider(tmcfg.Instrumentation),
|
||||
|
||||
Reference in New Issue
Block a user