mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Replace Serializer with Blob in SHAMapItem:
* This helps decouples SHAMap and Serializer. * Restyle data member names. * Rename getTag() to key().
This commit is contained in:
committed by
Vinnie Falco
parent
72659d431e
commit
26bfeb1319
@@ -606,7 +606,7 @@ bool SHAMap::deepCompare (SHAMap& other) const
|
||||
return false;
|
||||
auto& nodePeek = static_cast<SHAMapTreeNode*>(node)->peekItem();
|
||||
auto& otherNodePeek = static_cast<SHAMapTreeNode*>(otherNode)->peekItem();
|
||||
if (nodePeek->getTag() != otherNodePeek->getTag())
|
||||
if (nodePeek->key() != otherNodePeek->key())
|
||||
return false;
|
||||
if (nodePeek->peekData() != otherNodePeek->peekData())
|
||||
return false;
|
||||
@@ -742,7 +742,7 @@ SHAMap::visitDifferences(SHAMap* have,
|
||||
if (root_->isLeaf ())
|
||||
{
|
||||
auto leaf = std::static_pointer_cast<SHAMapTreeNode>(root_);
|
||||
if (!have || !have->hasLeafNode(leaf->peekItem()->getTag(), leaf->getNodeHash()))
|
||||
if (!have || !have->hasLeafNode(leaf->peekItem()->key(), leaf->getNodeHash()))
|
||||
func (*root_);
|
||||
|
||||
return;
|
||||
@@ -779,7 +779,7 @@ SHAMap::visitDifferences(SHAMap* have,
|
||||
stack.push ({static_cast<SHAMapInnerNode*>(next), childID});
|
||||
}
|
||||
else if (!have || !have->hasLeafNode(
|
||||
static_cast<SHAMapTreeNode*>(next)->peekItem()->getTag(),
|
||||
static_cast<SHAMapTreeNode*>(next)->peekItem()->key(),
|
||||
childHash))
|
||||
{
|
||||
if (! func (*next))
|
||||
|
||||
Reference in New Issue
Block a user