regen-network / indexer

:rocket: Blockchain indexer and database
Other
2 stars 0 forks source link

Simplify logic in index votes process #44

Closed wgwz closed 7 months ago

wgwz commented 1 year ago

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