Add describeOwnerDir

This commit is contained in:
Vinnie Falco
2015-07-26 12:28:18 -07:00
committed by Edward Hennis
parent fa900de548
commit 147fee0272
2 changed files with 13 additions and 1 deletions

View File

@@ -201,6 +201,9 @@ dirNext (ApplyView& view,
unsigned int& uDirEntry, // <-> next entry
uint256& uEntryIndex); // <-- The entry, if available. Otherwise, zero.
std::function<void (SLE::ref, bool)>
describeOwnerDir(AccountID const& account);
// <-- uNodeDir: For deletion, present to make dirDelete efficient.
// --> uRootIndex: The index of the base of the directory. Nodes are based off of this.
// --> uLedgerIndex: Value to add to directory.

View File

@@ -23,8 +23,8 @@
#include <ripple/basics/contract.h>
#include <ripple/basics/Log.h>
#include <ripple/basics/StringUtilities.h>
#include <ripple/protocol/st.h>
#include <ripple/protocol/Quality.h>
#include <ripple/protocol/STArray.h>
#include <boost/algorithm/string.hpp>
#include <cassert>
@@ -572,6 +572,15 @@ dirNext (ApplyView& view,
return true;
}
std::function<void (SLE::ref, bool)>
describeOwnerDir(AccountID const& account)
{
return [account](std::shared_ptr<SLE> const& sle, bool)
{
(*sle)[sfOwner] = account;
};
}
TER
dirAdd (ApplyView& view,
std::uint64_t& uNodeDir,