You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second one is more complicated to handle because of the way the db is structured right now. The only way to iterate through all delegations of a particular pool is to use PoSAccountingView::get_pool_delegations_shares, but if the balance is 0 the shares are no longer present and we cannot easily get all DelegationId of a pool.
There are 2 possible solutions:
Keep zero values for delegation balances. This way get_pool_delegations_shares would return all delegations even with empty balances. The downside of this approach is that it requires storing useless data and changing low-level logic of the accounting crate where values are merged.
Change the schema of the db. Instead of having following maps:
DelegationId -> DelegationData
DelegationId -> Amount
(PoolId, DelegationId) -> Amount
we could use something like:
DelegationId -> DelegationData
DelegationId -> Amount
PoolId -> Vec[DelegationId]
which will make manipulations and access more complex.
Activity
[-]Finilize delegation clean up from db[/-][+]Finalize delegation clean up from db[/+]