diff --git a/server/v2/cometbft/abci.go b/server/v2/cometbft/abci.go index 45b1d962f8..372886792e 100644 --- a/server/v2/cometbft/abci.go +++ b/server/v2/cometbft/abci.go @@ -315,7 +315,7 @@ func (c *Consensus[T]) PrepareProposal( } decodedTxs := make([]T, len(req.Txs)) - for _, tx := range req.Txs { + for i, tx := range req.Txs { decTx, err := c.txCodec.Decode(tx) if err != nil { // TODO: vote extension meta data as a custom type to avoid possibly accepting invalid txs @@ -323,7 +323,8 @@ func (c *Consensus[T]) PrepareProposal( c.logger.Error("failed to decode tx", "err", err) continue } - decodedTxs = append(decodedTxs, decTx) + + decodedTxs[i] = decTx } ciCtx := contextWithCometInfo(ctx, comet.Info{