iroha
iroha copied to clipboard
Move `asset_total_amount` inside the asset definition
Currently we store asset_total_amount as a separate collection inside WSV that maps AssetDefinitionId to the running total of a numeric asset existing.
As suggested by @mversic on daily, this collection can merged into AssetDefinition, making it just a field of it. This will help with getting rid of FindTotalAssetQuantityByAssetDefinitionId singular query (#4933).
Potential drawbacks
May increase lock contention as more accesses will be done to a single collection instead of separate collections.