Skip to content

Commit

Permalink
indexer test
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Sep 3, 2024
1 parent de01173 commit 901cc34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions indexers/txindex/indexer_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,15 @@ func TestIndexerServiceIndexesBlocks(t *testing.T) {
res, err = txIndexer.Get(types.Tx("bar").Hash())
require.NoError(t, err)
require.Equal(t, txResult2, res)

blocksPruned, err := blockIndexer.Prune(1, 2)
require.NoError(t, err)
expectedBlocksPruned := uint64(1)
require.Equal(t, expectedBlocksPruned, blocksPruned)

txPruned, err := txIndexer.Prune(1, 2)
require.NoError(t, err)
expectedTxPruned := uint64(2)
require.Equal(t, expectedTxPruned, txPruned)

}

0 comments on commit 901cc34

Please sign in to comment.