From 8a92ab51a93502b10a431b24d7f0edc02fe3e345 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 17 Jun 2024 17:07:31 -0600 Subject: [PATCH] change location --- baseapp/abci.go | 10 ++++++++++ baseapp/baseapp.go | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/baseapp/abci.go b/baseapp/abci.go index 32a6d8683227..ef17ecc0a72a 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -412,6 +412,16 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliv return sdkerrors.ResponseDeliverTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, sdk.MarkEventsToIndex(anteEvents, app.indexEvents), app.trace) } + if sdk.MaxEventSize > 0 { + for _, event := range result.Events { + for _, attr := range event.Attributes { + if len([]byte(attr.Key))+len([]byte(attr.Value)) > sdk.MaxEventSize { + attr.Value = "evt val too large, inc max-event-size in config.toml" + } + } + } + } + return abci.ResponseDeliverTx{ GasWanted: int64(gInfo.GasWanted), // TODO: Should type accept unsigned ints? GasUsed: int64(gInfo.GasUsed), // TODO: Should type accept unsigned ints? diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index c8c7ee401d98..dc1376f8613d 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -775,16 +775,6 @@ func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, re } } - if sdk.MaxEventSize > 0 { - for _, event := range result.Events { - for _, attr := range event.Attributes { - if len([]byte(attr.Key))+len([]byte(attr.Value)) > sdk.MaxEventSize { - attr.Value = "evt val too large, inc max-event-size in config.toml" - } - } - } - } - return gInfo, result, anteEvents, priority, err }