This PR added the calculation of unconfirmed TVL. The calculation workflow is as follows.
After a confirmed block is handled, it checks whether the indexer is synced with BTC, namely whether tip_height - last_confirmed_height==k where k is the parameterized confirmation depth.
If so, it starts the calculation by downloading unconfirmed blocks. Then it iterates all the txs of each unconfirmed block to identify staking and unbonding transactions, and do addition and subtraction accordingly
After the unconfirmed TVL is calculated, it will push the UnconfirmedInfo event by combining the confirmed tvl from the local store
This PR added the calculation of unconfirmed TVL. The calculation workflow is as follows.
tip_height - last_confirmed_height==k
wherek
is the parameterized confirmation depth.UnconfirmedInfo
event by combining the confirmed tvl from the local storeFuzz tests and e2e tests are included in this pr.