Flush to disk more consistently by accounting memory usage of serials/anchors in cache.

This commit is contained in:
Sean Bowe
2016-06-27 10:52:34 -06:00
parent 658cdb15f7
commit 7f3c7a683b
2 changed files with 19 additions and 7 deletions

View File

@@ -60,6 +60,12 @@ public:
IncrementalMerkleTree() { }
size_t DynamicMemoryUsage() const {
return 32 + // left
32 + // right
parents.size() * 32; // parents
}
void append(Hash obj);
Hash root() const {
return root(Depth, std::deque<Hash>());