From 25990ea160bbe150e0bbac8c94133a2115a8e382 Mon Sep 17 00:00:00 2001 From: Nina Barbakadze Date: Wed, 19 Jun 2024 15:34:47 +0200 Subject: [PATCH] fix: broken tx pruning test --- store/store_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/store/store_test.go b/store/store_test.go index c370ce0f01..6bdd453bc6 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -599,6 +599,7 @@ func TestPruneBlocksPrunesTxs(t *testing.T) { partSet := block.MakePartSet(2) seenCommit := makeTestCommit(h, cmttime.Now()) blockStore.SaveBlock(block, partSet, seenCommit) + blockStore.SaveTxInfo(block, make([]uint32, len(block.Txs))) for _, tx := range block.Txs { indexedTxHashes = append(indexedTxHashes, tx.Hash()) } @@ -633,7 +634,8 @@ func TestPruneBlocksPrunesTxs(t *testing.T) { txInfo := blockStore.LoadTxInfo(tx.Hash()) require.NoError(t, err) require.Equal(t, h, txInfo.Height) - require.Equal(t, int64(i), txInfo.Index) + require.Equal(t, uint32(i), txInfo.Index) + require.Equal(t, uint32(0), txInfo.Code) } } }