libplanet
libplanet copied to clipboard
Fix `TrieStateStore.PruneStates()` to work together with fragmented states
Since fragmented states were introduced:
TrieStateStore.PruneStates() method has not worked well. Note that there's even a comment addressing this:
There are two problems:
- [x] It throws
ArgumentOutOfRangeExceptionbecause nowIStateStorehas keys other than SHA-256 digest. - [ ] Reference tracking works only at MPT-level. References between fragmented states also should be tracked.
The former one should be published as a hotfix. The latter one would accompany API changes, so it should be published in the next minor release.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.