Basically we have a loop that is unnecessary.
Instead of the loop we can restructure the index votes process to read "chain_num" that the indexer is currently running for.
And then we just adjust the code to find the max block height for that chain num in the votes table, rather than doing the loop for each chain.
Basically we have a loop that is unnecessary. Instead of the loop we can restructure the index votes process to read "chain_num" that the indexer is currently running for. And then we just adjust the code to find the max block height for that chain num in the
votes
table, rather than doing the loop for each chain.See also this thread: https://github.com/regen-network/indexer/pull/38#discussion_r1317593375