mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Split SHAMapTreeNode into leaf and inner nodes.
* This reduces the memory requirements of both leaf and inner nodes. * The name SHAMapTreeNode is retained for leaf nodes so as to keep the public API of SHAMap stable.
This commit is contained in:
committed by
Nik Bougalis
parent
e95ab65396
commit
f875603525
@@ -235,16 +235,16 @@ public:
|
||||
if (!node.has_nodeid () || !node.has_nodedata ())
|
||||
return;
|
||||
|
||||
SHAMapTreeNode newNode(
|
||||
auto newNode = SHAMapAbstractNode::make(
|
||||
Blob (node.nodedata().begin(), node.nodedata().end()),
|
||||
0, snfWIRE, uZero, false);
|
||||
|
||||
s.erase();
|
||||
newNode.addRaw(s, snfPREFIX);
|
||||
newNode->addRaw(s, snfPREFIX);
|
||||
|
||||
auto blob = std::make_shared<Blob> (s.begin(), s.end());
|
||||
|
||||
getApp().getOPs().addFetchPack (newNode.getNodeHash(), blob);
|
||||
getApp().getOPs().addFetchPack (newNode->getNodeHash(), blob);
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
||||
Reference in New Issue
Block a user