Skip to content

Commit

Permalink
Change signature of SHAMap::getFetchPack to use SHAMapHash
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardHinnant authored and nbougalis committed Dec 16, 2015
1 parent 493752e commit 0dbaced
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ripple/app/ledger/impl/LedgerMaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ());
};

Expand Down
2 changes: 1 addition & 1 deletion src/ripple/shamap/SHAMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class SHAMap
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 ();

Expand Down
4 changes: 2 additions & 2 deletions src/ripple/shamap/impl/SHAMapSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down

0 comments on commit 0dbaced

Please sign in to comment.