mintlayer / mintlayer-core

Mintlayer Core: The central repository housing the essential components to operate a Mintlayer node. It encompasses the node and wallet functionalities necessary for seamless operation, alongside an additional API server designed to facilitate applications.
https://www.mintlayer.org
MIT License
43 stars 25 forks source link

Remove `PoSAccountingOperations` impl for `PoSAccountingDB` #1745

Closed azarovh closed 4 months ago

azarovh commented 4 months ago

Currently both PoSAccountingDelta and PoSAccountingDB implement PoSAccountingOperations trait which ends up in double the implementation code and tests as well as ugly enum for undo which we have to match on execution and panic if an arm is wrong. I think that it's enough to keep only Delta implement this trait.

Also InMemoryTokensAccounting doesn't have to implement TokensAccountingView.