From 4d5c96ab00ee606cbf0d328b88e6817d5f098113 Mon Sep 17 00:00:00 2001 From: huangyi Date: Wed, 14 Aug 2024 08:33:21 +0700 Subject: [PATCH] Problem: block-stm executor status not logged Solution: - add a log with the number of workers --- app/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/app.go b/app/app.go index 80401cee2e..7da2128af5 100644 --- a/app/app.go +++ b/app/app.go @@ -12,6 +12,7 @@ import ( "net/http" "os" "path/filepath" + stdruntime "runtime" "sort" abci "github.com/cometbft/cometbft/abci/types" @@ -424,6 +425,10 @@ func New( if blockSTMEnabled { sdk.SetAddrCacheEnabled(false) workers := cast.ToInt(appOpts.Get(srvflags.EVMBlockSTMWorkers)) + if workers == 0 { + workers = stdruntime.NumCPU() + } + logger.Info("block-stm executor enabled", "workers", workers) app.SetTxExecutor(evmapp.STMTxExecutor(app.GetStoreKeys(), workers)) } else { app.SetTxExecutor(evmapp.DefaultTxExecutor)