mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Change signature of SHAMap::getFetchPack to use SHAMapHash
This commit is contained in:
committed by
Nik Bougalis
parent
493752e1c6
commit
0dbacedb58
@@ -1915,12 +1915,12 @@ void LedgerMasterImp::makeFetchPack (
|
||||
auto fpAppender = [](
|
||||
protocol::TMGetObjectByHash* reply,
|
||||
std::uint32_t ledgerSeq,
|
||||
uint256 const& hash,
|
||||
SHAMapHash const& hash,
|
||||
const Blob& blob)
|
||||
{
|
||||
protocol::TMIndexedObject& newObj = * (reply->add_objects ());
|
||||
newObj.set_ledgerseq (ledgerSeq);
|
||||
newObj.set_hash (hash.begin (), 256 / 8);
|
||||
newObj.set_hash (hash.as_uint256().begin (), 256 / 8);
|
||||
newObj.set_data (&blob[0], blob.size ());
|
||||
};
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
void visitDifferences(SHAMap* have, std::function<bool(SHAMapAbstractNode&)>) const;
|
||||
|
||||
void getFetchPack (SHAMap * have, bool includeLeaves, int max,
|
||||
std::function<void (uint256 const&, const Blob&)>) const;
|
||||
std::function<void (SHAMapHash const&, const Blob&)>) const;
|
||||
|
||||
void setUnbacked ();
|
||||
|
||||
|
||||
@@ -711,7 +711,7 @@ Note: a caller should set includeLeaves to false for transaction trees.
|
||||
There's no point in including the leaves of transaction trees.
|
||||
*/
|
||||
void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max,
|
||||
std::function<void (uint256 const&, const Blob&)> func) const
|
||||
std::function<void (SHAMapHash const&, const Blob&)> func) const
|
||||
{
|
||||
visitDifferences (have,
|
||||
[includeLeaves, &max, &func] (SHAMapAbstractNode& smn) -> bool
|
||||
@@ -720,7 +720,7 @@ void SHAMap::getFetchPack (SHAMap* have, bool includeLeaves, int max,
|
||||
{
|
||||
Serializer s;
|
||||
smn.addRaw (s, snfPREFIX);
|
||||
func (smn.getNodeHash().as_uint256(), s.peekData());
|
||||
func (smn.getNodeHash(), s.peekData());
|
||||
|
||||
if (--max <= 0)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user