Closed kaykurokawa closed 6 years ago
I will try to make the task. You mean CDBWrapper (reads from disk) as well as CDBBatch (write to disk) to separated in related class, right?
Yes basically anything that has to do with CClaimTrie.db in claimtrie.h/cpp
I found that architecture is not good enough to me. Did you accept more agressive refactor? Why, CClaimTrieCache should have all dirty nodes and CClaimTrie should search in, when it's not found, then query CClaimTrieDb (new separed class) so CClaimTrie became a interface between cache and db. This will result in remove of all dirtyQueueXXX and related functions from CClaimTrie. Is this acceptable to you?
https://github.com/lbryio/lbrycrd/pull/140 It's simple, i can make more aggressive refactor if still needs
handled by #175
closing for #175
All disk read/write functions done through the CDBWrapper class in ClaimTrie should be separated out onto its own file/class. This should improve readability as it should be much clearer what is being saved and how. We should also write unit tests for the separated out disk read/write class.