mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor Serializer and SerializerIterator interfaces:
* Remove unused members * SerialIter holds only a pointer and offset now * Use free functions for some Serializer members * Use SerialIter in some places instead of Serializer
This commit is contained in:
committed by
Nik Bougalis
parent
a691632995
commit
bb4127a6fb
@@ -685,7 +685,7 @@ void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max,
|
||||
if (root->isLeaf ())
|
||||
{
|
||||
if (includeLeaves &&
|
||||
(!have || !have->hasLeafNode (root->getTag (), root->getNodeHash ())))
|
||||
(!have || !have->hasLeafNode (root->peekItem()->getTag (), root->getNodeHash ())))
|
||||
{
|
||||
Serializer s;
|
||||
root->addRaw (s, snfPREFIX);
|
||||
@@ -728,7 +728,7 @@ void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max,
|
||||
if (!have || !have->hasInnerNode (childID, childHash))
|
||||
stack.push ({next, childID});
|
||||
}
|
||||
else if (includeLeaves && (!have || !have->hasLeafNode (next->getTag(), childHash)))
|
||||
else if (includeLeaves && (!have || !have->hasLeafNode (next->peekItem()->getTag(), childHash)))
|
||||
{
|
||||
Serializer s;
|
||||
next->addRaw (s, snfPREFIX);
|
||||
|
||||
Reference in New Issue
Block a user