Skip to content

Commit

Permalink
Problem: block-stm executor status not logged (#1548)
Browse files Browse the repository at this point in the history
Solution:
- add a log with the number of workers
  • Loading branch information
yihuang authored Aug 14, 2024
1 parent bc5dfc5 commit af15fa3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"net/http"
"os"
"path/filepath"
stdruntime "runtime"
"sort"

abci "github.com/cometbft/cometbft/abci/types"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit af15fa3

Please sign in to comment.