From 4943be334930257d3c0171eca3fd074f5153c7db Mon Sep 17 00:00:00 2001 From: Nina Barbakadze <barbakadzeninaa@gmail.com> Date: Fri, 6 Dec 2024 15:12:45 +0100 Subject: [PATCH] test: fix big blobs test --- app/test/big_blob_test.go | 4 ++-- app/validate_txs.go | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/test/big_blob_test.go b/app/test/big_blob_test.go index cede1ae65d..f6c62e8441 100644 --- a/app/test/big_blob_test.go +++ b/app/test/big_blob_test.go @@ -67,8 +67,8 @@ func (s *BigBlobSuite) TestErrBlobsTooLarge() { } testCases := []testCase{ { - name: "2 mebibyte blob", - blob: newBlobWithSize(2 * mebibyte), + name: "~ 1.9 mebibyte blob", + blob: newBlobWithSize(2_000_000), want: blobtypes.ErrBlobsTooLarge.ABCICode(), }, } diff --git a/app/validate_txs.go b/app/validate_txs.go index 9657dc8377..346bcd7f45 100644 --- a/app/validate_txs.go +++ b/app/validate_txs.go @@ -38,6 +38,7 @@ func separateTxs(_ client.TxConfig, rawTxs [][]byte) ([][]byte, []*tx.BlobTx) { func FilterTxs(logger log.Logger, ctx sdk.Context, handler sdk.AnteHandler, txConfig client.TxConfig, txs [][]byte) [][]byte { // all transactions should be below the max tx size maxTxSize := appconsts.MaxTxSize(ctx.BlockHeader().Version.App) + //nolint:prealloc var txsBelowLimit [][]byte for idx, tx := range txs { if len(tx) > maxTxSize {