Currently, `prepare_indexed_txs` is still one of the slowest parts of the indexer due to the disk access, even when using batched queries.
We add a `TxNumCache`, which simply stores the last `depth_blocks` worth of tx nums in a VecDeque of HashMaps. The latest block of txids is dropped off at the end, and the new block is added at the beginning.
| bench | total time [s] | time prepare [s] |
| no prepare | 1066.85 | 0 |
| old, before D15571 | 4375.39 | 3308.54 |
| D15571 | 3148.51 | 2081.66 |
| this diff, depth = 10 | | |
| this diff, depth = 100 | | |
| this diff, depth = 1000 | | |