mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Refactor uses of strCopy (RIPD-1256)
Replace the sparsely used strCopy function with Slice. Change some of the SHAMap interface to use Slice instead of Blob, which should eliminate a copy.
This commit is contained in:
committed by
Nik Bougalis
parent
c1b8efb7af
commit
0d803e0fa2
@@ -215,14 +215,14 @@ SHAMapAddNode TransactionAcquire::takeNodes (const std::list<SHAMapNodeID>& node
|
||||
if (mHaveRoot)
|
||||
JLOG (j_.debug()) << "Got root TXS node, already have it";
|
||||
else if (!mMap->addRootNode (SHAMapHash{getHash ()},
|
||||
*nodeDatait, snfWIRE, nullptr).isGood())
|
||||
makeSlice(*nodeDatait), snfWIRE, nullptr).isGood())
|
||||
{
|
||||
JLOG (j_.warn()) << "TX acquire got bad root node";
|
||||
}
|
||||
else
|
||||
mHaveRoot = true;
|
||||
}
|
||||
else if (!mMap->addKnownNode (*nodeIDit, *nodeDatait, &sf).isGood())
|
||||
else if (!mMap->addKnownNode (*nodeIDit, makeSlice(*nodeDatait), &sf).isGood())
|
||||
{
|
||||
JLOG (j_.warn()) << "TX acquire got bad non-root node";
|
||||
return SHAMapAddNode::invalid ();
|
||||
|
||||
Reference in New Issue
Block a user