Skip to content

Commit

Permalink
Seiv2 runtx (#448)
Browse files Browse the repository at this point in the history
## Describe your changes and provide context
Uncomment a metric for seiv2

## Testing performed to validate your change
  • Loading branch information
udpatil committed Mar 1, 2024
1 parent 92d01be commit 1e04c08
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,13 +829,13 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context
// and execute successfully. An error is returned otherwise.
func (app *BaseApp) runTx(ctx sdk.Context, mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, result *sdk.Result, anteEvents []abci.Event, priority int64, err error) {

// defer telemetry.MeasureThroughputSinceWithLabels(
// telemetry.TxCount,
// []metrics.Label{
// telemetry.NewLabel("mode", modeKeyToString[mode]),
// },
// time.Now(),
// )
defer telemetry.MeasureThroughputSinceWithLabels(
telemetry.TxCount,
[]metrics.Label{
telemetry.NewLabel("mode", modeKeyToString[mode]),
},
time.Now(),
)

// Reset events after each checkTx or simulateTx or recheckTx
// DeliverTx is garbage collected after FinalizeBlocker
Expand Down
2 changes: 1 addition & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
DefaultConcurrencyWorkers = 20

// DefaultOccEanbled defines whether to use OCC for tx processing
DefaultOccEnabled = true
DefaultOccEnabled = false
)

// BaseConfig defines the server's basic configuration
Expand Down
5 changes: 4 additions & 1 deletion server/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ func TestSetConcurrencyWorkers(t *testing.T) {

func TestOCCEnabled(t *testing.T) {
cfg := DefaultConfig()
require.Equal(t, true, cfg.OccEnabled)
require.False(t, cfg.OccEnabled)

cfg.BaseConfig.OccEnabled = true
require.True(t, cfg.OccEnabled)
}

0 comments on commit 1e04c08

Please sign in to comment.