mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-03 17:05:50 +00:00
Refactor and improve the SHAMap code:
This commit combines a number of cleanups, targeting both the code structure and the code logic. Large changes include: - Using more strongly-typed classes for SHAMap nodes, instead of relying on runtime-time detection of class types. This change saves 16 bytes of memory per node. - Improving the interface of SHAMap::addGiveItem and SHAMap::addItem to avoid the need for passing two bool arguments. - Documenting the "copy-on-write" semantics that SHAMap uses to efficiently track changes in individual nodes. - Removing unused code and simplifying several APIs. - Improving function naming.
This commit is contained in:
@@ -67,10 +67,8 @@ buildLedgerImpl(
|
||||
// Write the final version of all modified SHAMap
|
||||
// nodes to the node store to preserve the new LCL
|
||||
|
||||
int const asf =
|
||||
built->stateMap().flushDirty(hotACCOUNT_NODE, built->info().seq);
|
||||
int const tmf =
|
||||
built->txMap().flushDirty(hotTRANSACTION_NODE, built->info().seq);
|
||||
int const asf = built->stateMap().flushDirty(hotACCOUNT_NODE);
|
||||
int const tmf = built->txMap().flushDirty(hotTRANSACTION_NODE);
|
||||
JLOG(j.debug()) << "Flushed " << asf << " accounts and " << tmf
|
||||
<< " transaction nodes";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user