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
{{ message }}
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.
In addition to MPT logic, BaseTrie also has methods for the underlying key-value db. This logic can be extracted to a separate class, to make BaseTrie more readable and reduce coupling. The methods include getRaw, 'putRaw, 'batchNodes, etc.
The text was updated successfully, but these errors were encountered:
CheckpointTrie tries to implement checkpointing by inheriting BaseTrie. During #73 I noticed that this might not be the best design, and this manifests in _enterCpMode and _exitCpMode where methods of BaseTrie are patched dynamically.
I think after extracting DB-related logic to a separate class, the checkpointing mechanism could be moved to this class. This would remove the need for patching methods dynamically, all other implementations of Trie (including SecureTrie) could use checkpointing without explicitly inheriting CheckpointTrie, and it would be more easy to reason about.
In addition to MPT logic,
BaseTrie
also has methods for the underlying key-value db. This logic can be extracted to a separate class, to makeBaseTrie
more readable and reduce coupling. The methods includegetRaw
, 'putRaw, 'batchNodes
, etc.The text was updated successfully, but these errors were encountered: