Update asset stats to handle eviction
tamirms opened this issue · 0 comments
tamirms commented
The /assets
response includes the following fields (code):
- number of contracts which have active balances holding the asset
- total amount of the asset held by all contracts in active balances
- number of contracts which have expired but not yet evicted balances holding the asset
- total amount of the asset held by all contracts in expired but not yet evicted balances
We can maintain active balances because LEDGER_ENTRY_RESTORE
is functionally equivalent to LEDGER_ENTRY_CREATED
changes.
However, we might need to remove or rename the fields which reflect stats for expired but not yet evicted contract asset balances. The fields are currently named archived_contracts_amount
and num_archived_contracts
which will be misleading because these counts don't include contract asset balances which have been evicted.