diff --git a/AMMUtils_8cpp_source.html b/AMMUtils_8cpp_source.html
index fb17529055..8115bc2133 100644
--- a/AMMUtils_8cpp_source.html
+++ b/AMMUtils_8cpp_source.html
@@ -604,8 +604,8 @@ $(document).ready(function() { init_codefold(0); });
Stream trace() const
Severity stream access functions.
Writeable view to a ledger, for applying a transaction.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
-bool emptyDirDelete(Keylet const &directory)
Remove the specified directory, if it is empty.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool emptyDirDelete(Keylet const &directory)
Remove the specified directory, if it is empty.
A currency issued by an account.
@@ -684,7 +684,7 @@ $(document).ready(function() { init_codefold(0); });
STAmount ammAccountHolds(ReadView const &view, AccountID const &ammAccountID, Issue const &issue)
Returns total amount held by AMM for the given token.
Number root(Number f, unsigned d)
TER deleteAMMTrustLine(ApplyView &view, std::shared_ptr< SLE > sleState, std::optional< AccountID > const &ammAccountID, beast::Journal j)
Delete trustline to AMM.
-std::uint16_t constexpr maxDeletableAMMTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
+std::uint16_t constexpr maxDeletableAMMTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
TERSubset< CanCvtToTER > TER
bool withinRelativeDistance(Quality const &calcQuality, Quality const &reqQuality, Number const &dist)
Check if the relative distance between the qualities is within the requested distance.
std::uint32_t constexpr AUCTION_SLOT_DISCOUNTED_FEE_FRACTION
diff --git a/AMM__test_8cpp_source.html b/AMM__test_8cpp_source.html
index 0a865681c8..0800c433f9 100644
--- a/AMM__test_8cpp_source.html
+++ b/AMM__test_8cpp_source.html
@@ -8304,7 +8304,7 @@ $(document).ready(function() { init_codefold(0); });
constexpr std::uint32_t tfTwoAssetIfEmpty
STAmount amountFromString(Asset const &asset, std::string const &amount)
constexpr std::uint32_t asfAllowTrustLineClawback
-std::uint16_t constexpr maxDeletableAMMTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
+std::uint16_t constexpr maxDeletableAMMTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
constexpr std::uint32_t asfRequireAuth
diff --git a/ApplyView_8cpp_source.html b/ApplyView_8cpp_source.html
index 1945c41712..e32ac5005b 100644
--- a/ApplyView_8cpp_source.html
+++ b/ApplyView_8cpp_source.html
@@ -105,362 +105,380 @@ $(document).ready(function() { init_codefold(0); });
22 #include <xrpl/ledger/ApplyView.h>
23 #include <xrpl/protocol/Protocol.h>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
40 root ->setFieldH256(sfRootIndex, directory.
key );
-
-
-
-
-
45 root ->setFieldV256(sfIndexes, v);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
59 LogicError (
"Directory chain: root back-pointer broken." );
-
-
-
62 auto indexes = node->getFieldV256(sfIndexes);
-
-
-
-
-
-
-
69 if (
std::find (indexes.begin(), indexes.end(), key) != indexes.end())
-
-
-
72 indexes.push_back(key);
-
-
-
-
-
-
-
79 std::sort (indexes.begin(), indexes.end());
-
-
-
-
83 if (pos != indexes.end() && key == *pos)
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
43 root ->setFieldH256(sfRootIndex, directory.
key );
+
+
+
+
+
48 root ->setFieldV256(sfIndexes, v);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
62 LogicError (
"Directory chain: root back-pointer broken." );
+
+
+
65 auto indexes = node->getFieldV256(sfIndexes);
+
+
+
+
+
+
+
72 if (
std::find (indexes.begin(), indexes.end(), key) != indexes.end())
+
+
+
75 indexes.push_back(key);
+
+
+
+
+
+
+
82 std::sort (indexes.begin(), indexes.end());
+
+
-
86 indexes.insert(pos, key);
-
+
86 if (pos != indexes.end() && key == *pos)
+
-
89 node->setFieldV256(sfIndexes, indexes);
-
-
-
-
-
-
-
-
-
-
-
100 node->setFieldU64(sfIndexNext, page);
-
-
-
103 root ->setFieldU64(sfIndexPrevious, page);
-
-
-
-
-
108 indexes.push_back(key);
-
-
-
111 node->setFieldH256(sfRootIndex, directory.
key );
-
112 node->setFieldV256(sfIndexes, indexes);
+
89 indexes.insert(pos, key);
+
+
+
92 node->setFieldV256(sfIndexes, indexes);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
117 node->setFieldU64(sfIndexPrevious, page - 1);
-
-
-
-
-
+
+
+
116 node->setFieldU64(sfIndexNext, page);
+
+
+
119 root ->setFieldU64(sfIndexPrevious, page);
+
+
+
+
+
124 indexes.push_back(key);
+
+
+
127 node->setFieldH256(sfRootIndex, directory.
key );
+
128 node->setFieldV256(sfIndexes, indexes);
+
+
+
+
+
133 node->setFieldU64(sfIndexPrevious, page - 1);
+
+
+
+
+
-
-
-
-
-
-
127 auto node =
peek (directory);
-
-
-
-
-
-
133 if (directory.
type != ltDIR_NODE ||
-
134 node->getFieldH256(sfRootIndex) != directory.
key )
-
-
-
137 UNREACHABLE(
"ripple::ApplyView::emptyDirDelete : invalid node type" );
-
-
-
-
-
-
143 if (!node->getFieldV256(sfIndexes).empty())
-
-
-
-
147 auto prevPage = node->getFieldU64(sfIndexPrevious);
-
148 auto nextPage = node->getFieldU64(sfIndexNext);
-
-
150 if (nextPage == rootPage && prevPage != rootPage)
-
151 LogicError (
"Directory chain: fwd link broken" );
-
-
153 if (prevPage == rootPage && nextPage != rootPage)
-
154 LogicError (
"Directory chain: rev link broken" );
-
-
-
-
158 if (nextPage == prevPage && nextPage != rootPage)
-
-
+
+
+
+
+
+
143 auto node =
peek (directory);
+
+
+
+
+
+
149 if (directory.
type != ltDIR_NODE ||
+
150 node->getFieldH256(sfRootIndex) != directory.
key )
+
+
+
153 UNREACHABLE(
"ripple::ApplyView::emptyDirDelete : invalid node type" );
+
+
+
+
+
+
159 if (!node->getFieldV256(sfIndexes).empty())
+
-
-
163 LogicError (
"Directory chain: fwd link broken." );
-
-
165 if (!last->getFieldV256(sfIndexes).empty())
-
-
-
-
-
170 node->setFieldU64(sfIndexNext, rootPage);
-
171 node->setFieldU64(sfIndexPrevious, rootPage);
-
-
-
-
-
-
-
-
-
-
-
-
-
184 if (nextPage == rootPage && prevPage == rootPage)
-
-
-
-
-
+
+
163 auto prevPage = node->getFieldU64(sfIndexPrevious);
+
164 auto nextPage = node->getFieldU64(sfIndexNext);
+
+
166 if (nextPage == rootPage && prevPage != rootPage)
+
167 LogicError (
"Directory chain: fwd link broken" );
+
+
169 if (prevPage == rootPage && nextPage != rootPage)
+
170 LogicError (
"Directory chain: rev link broken" );
+
+
+
+
174 if (nextPage == prevPage && nextPage != rootPage)
+
+
+
+
+
179 LogicError (
"Directory chain: fwd link broken." );
+
+
181 if (!last->getFieldV256(sfIndexes).empty())
+
+
+
+
+
186 node->setFieldU64(sfIndexNext, rootPage);
+
187 node->setFieldU64(sfIndexPrevious, rootPage);
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
205 auto entries = node->getFieldV256(sfIndexes);
-
-
207 auto it =
std::find (entries.begin(), entries.end(), key);
-
-
209 if (entries.end() == it)
-
-
-
-
+
+
200 if (nextPage == rootPage && prevPage == rootPage)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
215 node->setFieldV256(sfIndexes, entries);
-
+
+
-
218 if (!entries.empty())
-
-
-
-
-
-
-
225 auto prevPage = node->getFieldU64(sfIndexPrevious);
-
226 auto nextPage = node->getFieldU64(sfIndexNext);
+
+
+
+
221 auto entries = node->getFieldV256(sfIndexes);
+
+
223 auto it =
std::find (entries.begin(), entries.end(), key);
+
+
225 if (entries.end() == it)
+
-
-
-
-
-
232 if (page == rootPage)
-
-
234 if (nextPage == page && prevPage != page)
-
235 LogicError (
"Directory chain: fwd link broken" );
-
-
237 if (prevPage == page && nextPage != page)
-
238 LogicError (
"Directory chain: rev link broken" );
-
-
-
-
-
243 if (nextPage == prevPage && nextPage != page)
-
-
-
-
247 LogicError (
"Directory chain: fwd link broken." );
-
-
249 if (last->getFieldV256(sfIndexes).empty())
-
-
-
-
253 node->setFieldU64(sfIndexNext, page);
-
254 node->setFieldU64(sfIndexPrevious, page);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
271 if (nextPage == page && prevPage == page)
-
-
-
-
-
-
-
278 if (nextPage == page)
-
279 LogicError (
"Directory chain: fwd link broken" );
-
-
281 if (prevPage == page)
-
282 LogicError (
"Directory chain: rev link broken" );
-
-
-
-
-
-
-
-
290 LogicError (
"Directory chain: fwd link broken." );
-
-
292 prev->setFieldU64(sfIndexNext, nextPage);
-
-
-
-
-
297 LogicError (
"Directory chain: rev link broken." );
-
-
299 next->setFieldU64(sfIndexPrevious, prevPage);
-
-
-
-
-
-
-
-
307 if (nextPage != rootPage && next->getFieldU64(sfIndexNext) == rootPage &&
-
308 next->getFieldV256(sfIndexes).empty())
-
-
-
-
-
-
-
315 prev->setFieldU64(sfIndexNext, rootPage);
-
+
+
+
+
231 node->setFieldV256(sfIndexes, entries);
+
+
+
234 if (!entries.empty())
+
+
+
+
+
+
+
241 auto prevPage = node->getFieldU64(sfIndexPrevious);
+
242 auto nextPage = node->getFieldU64(sfIndexNext);
+
+
+
+
+
+
248 if (page == rootPage)
+
+
250 if (nextPage == page && prevPage != page)
+
251 LogicError (
"Directory chain: fwd link broken" );
+
+
253 if (prevPage == page && nextPage != page)
+
254 LogicError (
"Directory chain: rev link broken" );
+
+
+
+
+
259 if (nextPage == prevPage && nextPage != page)
+
+
+
+
263 LogicError (
"Directory chain: fwd link broken." );
+
+
265 if (last->getFieldV256(sfIndexes).empty())
+
+
+
+
269 node->setFieldU64(sfIndexNext, page);
+
270 node->setFieldU64(sfIndexPrevious, page);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
287 if (nextPage == page && prevPage == page)
+
+
+
+
+
+
+
294 if (nextPage == page)
+
295 LogicError (
"Directory chain: fwd link broken" );
+
+
297 if (prevPage == page)
+
298 LogicError (
"Directory chain: rev link broken" );
+
+
+
+
+
+
+
+
306 LogicError (
"Directory chain: fwd link broken." );
+
+
308 prev->setFieldU64(sfIndexNext, nextPage);
+
+
+
+
+
313 LogicError (
"Directory chain: rev link broken." );
+
+
315 next->setFieldU64(sfIndexPrevious, prevPage);
+
-
-
-
-
321 LogicError (
"Directory chain: root link broken." );
-
322 root ->setFieldU64(sfIndexPrevious, prevPage);
-
-
-
-
-
-
-
-
330 if (!keepRoot && nextPage == rootPage && prevPage == rootPage)
-
-
332 if (prev->getFieldV256(sfIndexes).empty())
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
323 if (nextPage != rootPage && next->getFieldU64(sfIndexNext) == rootPage &&
+
324 next->getFieldV256(sfIndexes).empty())
+
+
+
+
+
+
+
331 prev->setFieldU64(sfIndexNext, rootPage);
+
+
+
+
+
+
337 LogicError (
"Directory chain: root link broken." );
+
338 root ->setFieldU64(sfIndexPrevious, prevPage);
+
+
+
+
+
+
+
+
346 if (!keepRoot && nextPage == rootPage && prevPage == rootPage)
-
-
-
-
-
-
353 for (
auto const & item : page->getFieldV256(sfIndexes))
-
-
-
356 pi = (*page)[~sfIndexNext];
-
-
-
-
-
-
+
348 if (prev->getFieldV256(sfIndexes).empty())
+
+
+
+
+
-
-
-
bool dirDelete(Keylet const &directory, std::function< void(uint256 const &)> const &)
Remove the specified directory, invoking the callback for every node.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
369 for (
auto const & item : page->getFieldV256(sfIndexes))
+
+
+
372 pi = (*page)[~sfIndexNext];
+
+
+
+
+
+
+
+
+
+
bool dirDelete(Keylet const &directory, std::function< void(uint256 const &)> const &)
Remove the specified directory, invoking the callback for every node.
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
-
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
-
bool emptyDirDelete(Keylet const &directory)
Remove the specified directory, if it is empty.
-
std::optional< std::uint64_t > dirAdd(bool preserveOrder, Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Add an entry to a directory using the specified insert strategy.
+
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+
bool emptyDirDelete(Keylet const &directory)
Remove the specified directory, if it is empty.
+
std::optional< std::uint64_t > dirAdd(bool preserveOrder, Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Add an entry to a directory using the specified insert strategy.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
+
virtual Rules const & rules() const =0
Returns the tx processing rules.
+
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
void push_back(uint256 const &v)
@@ -468,10 +486,13 @@ $(document).ready(function() { init_codefold(0); });
+
+
+
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-
std::uint64_t constexpr dirNodeMaxPages
The maximum number of pages allowed in a directory.
+
std::uint64_t constexpr dirNodeMaxPages
The maximum number of pages allowed in a directory.
std::size_t constexpr dirNodeMaxEntries
The maximum number of entries per directory page.
Number root(Number f, unsigned d)
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
@@ -481,6 +502,8 @@ $(document).ready(function() { init_codefold(0); });
A pair of SHAMap key and LedgerEntryType.
+
+
diff --git a/ApplyView_8h_source.html b/ApplyView_8h_source.html
index 7912f53129..ae189e04de 100644
--- a/ApplyView_8h_source.html
+++ b/ApplyView_8h_source.html
@@ -330,13 +330,13 @@ $(document).ready(function() { init_codefold(0); });
std::optional< std::uint64_t > dirInsert(Keylet const &directory, Keylet const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
virtual void creditHook(AccountID const &from, AccountID const &to, STAmount const &amount, STAmount const &preCreditBalance)
-bool dirDelete(Keylet const &directory, std::function< void(uint256 const &)> const &)
Remove the specified directory, invoking the callback for every node.
+bool dirDelete(Keylet const &directory, std::function< void(uint256 const &)> const &)
Remove the specified directory, invoking the callback for every node.
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
-bool emptyDirDelete(Keylet const &directory)
Remove the specified directory, if it is empty.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool emptyDirDelete(Keylet const &directory)
Remove the specified directory, if it is empty.
std::optional< std::uint64_t > dirAppend(Keylet const &directory, Keylet const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Append an entry to a directory.
virtual void adjustOwnerCountHook(AccountID const &account, std::uint32_t cur, std::uint32_t next)
-std::optional< std::uint64_t > dirAdd(bool preserveOrder, Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Add an entry to a directory using the specified insert strategy.
+std::optional< std::uint64_t > dirAdd(bool preserveOrder, Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Add an entry to a directory using the specified insert strategy.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
virtual ApplyFlags flags() const =0
Returns the tx apply flags.
bool dirRemove(Keylet const &directory, std::uint64_t page, Keylet const &key, bool keepRoot)
diff --git a/Batch_8cpp_source.html b/Batch_8cpp_source.html
index 9673ea4257..488d52aa55 100644
--- a/Batch_8cpp_source.html
+++ b/Batch_8cpp_source.html
@@ -602,7 +602,7 @@ $(document).ready(function() { init_codefold(0); });
bool isTesSuccess(TER x) noexcept
-std::size_t constexpr maxBatchTxCount
The maximum number of transactions that can be in a batch.
+std::size_t constexpr maxBatchTxCount
The maximum number of transactions that can be in a batch.
constexpr std::uint32_t tfInnerBatchTxn
diff --git a/CashCheck_8cpp_source.html b/CashCheck_8cpp_source.html
index ceb33557e6..f18309c6bd 100644
--- a/CashCheck_8cpp_source.html
+++ b/CashCheck_8cpp_source.html
@@ -614,7 +614,7 @@ $(document).ready(function() { init_codefold(0); });
beast::Journal const journal
void deliver(STAmount const &amount)
Sets the DeliveredAmount field in the metadata.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
static TER preclaim(PreclaimContext const &ctx)
static NotTEC preflight(PreflightContext const &ctx)
diff --git a/Change_8cpp_source.html b/Change_8cpp_source.html
index 53cad28133..0c0c5b3423 100644
--- a/Change_8cpp_source.html
+++ b/Change_8cpp_source.html
@@ -625,7 +625,7 @@ $(document).ready(function() { init_codefold(0); });
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
void activateTrustLinesToSelfFix()
diff --git a/CredentialHelpers_8cpp_source.html b/CredentialHelpers_8cpp_source.html
index cfa71e606c..7eb3afed0a 100644
--- a/CredentialHelpers_8cpp_source.html
+++ b/CredentialHelpers_8cpp_source.html
@@ -503,7 +503,7 @@ $(document).ready(function() { init_codefold(0); });
Stream trace() const
Severity stream access functions.
Writeable view to a ledger, for applying a transaction.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
@@ -547,9 +547,9 @@ $(document).ready(function() { init_codefold(0); });
-std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
+std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
@ accepted
Manifest is valid.
-std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
+std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
diff --git a/Credentials_8cpp_source.html b/Credentials_8cpp_source.html
index 940e089aed..3b7ee48c17 100644
--- a/Credentials_8cpp_source.html
+++ b/Credentials_8cpp_source.html
@@ -252,7 +252,7 @@ $(document).ready(function() { init_codefold(0); });
163 << (page ?
"success" :
"failure" );
-
+
166 sleCred->setFieldU64(sfIssuerNode, *page);
@@ -272,7 +272,7 @@ $(document).ready(function() { init_codefold(0); });
183 << (page ?
"success" :
"failure" );
-
+
186 sleCred->setFieldU64(sfSubjectNode, *page);
@@ -525,12 +525,12 @@ $(document).ready(function() { init_codefold(0); });
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-std::size_t constexpr maxCredentialURILength
The maximum length of a URI inside a Credential.
+std::size_t constexpr maxCredentialURILength
The maximum length of a URI inside a Credential.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
std::function< void(SLE::ref)> describeOwnerDir(AccountID const &account)
-std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
+std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
diff --git a/Credentials__test_8cpp_source.html b/Credentials__test_8cpp_source.html
index 1961ee1304..b58420e045 100644
--- a/Credentials__test_8cpp_source.html
+++ b/Credentials__test_8cpp_source.html
@@ -647,559 +647,593 @@ $(document).ready(function() { init_codefold(0); });
558 jle[jss::result][jss::node][
"CredentialType" ] ==
-
-
-
-
- 565 Env env{*
this , features};
-
- 567 env.fund(
XRP (5000), issuer);
-
-
-
- 571 testcase (
"Credentials fail, subject doesn't exist." );
-
-
-
-
-
-
-
- 579 Env env{*
this , features};
+
+
+ 563 testcase (
"Credentials fail, directory full" );
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- 581 auto const reserve =
drops (env.current()->fees().reserve);
- 582 env.fund(
reserve , subject, issuer);
-
-
- 585 testcase (
"Credentials fail, not enough reserve." );
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 598 Env env{*
this , features};
+
+ 600 env.fund(
XRP (5000), issuer);
+
+
+
+ 604 testcase (
"Credentials fail, subject doesn't exist." );
+
+
+
+
+
+
+
+ 612 Env env{*
this , features};
+
+ 614 auto const reserve =
drops (env.current()->fees().reserve);
+ 615 env.fund(
reserve , subject, issuer);
+
+
+ 618 testcase (
"Credentials fail, not enough reserve." );
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
599 char const credType[] =
"abcde" ;
-
600 Account const issuer{
"issuer" };
-
601 Account const subject{
"subject" };
-
-
-
-
605 Env env{*
this , features};
-
-
607 env.fund(
XRP (5000), subject, issuer);
-
-
-
610 testcase (
"CredentialsAccept fail, Credential doesn't exist." );
-
-
-
-
-
-
-
617 testcase (
"CredentialsAccept fail, invalid Issuer account." );
-
-
-
-
-
-
-
-
-
626 "CredentialsAccept fail, invalid credentialType param." );
-
-
-
-
+
+
+
+
+
+
-
-
633 Env env{*
this , features};
-
-
635 env.fund(
drops (env.current()->fees().accountReserve(1)), issuer);
-
636 env.fund(
drops (env.current()->fees().accountReserve(0)), subject);
-
-
-
-
640 testcase (
"CredentialsAccept fail, not enough reserve." );
-
-
-
+
632 char const credType[] =
"abcde" ;
+
633 Account const issuer{
"issuer" };
+
634 Account const subject{
"subject" };
+
+
+
+
638 Env env{*
this , features};
+
+
640 env.fund(
XRP (5000), subject, issuer);
+
+
+
643 testcase (
"CredentialsAccept fail, Credential doesn't exist." );
-
+
-
-
-
-
-
-
652 jle.isObject() && jle.isMember(jss::result) &&
-
653 !jle[jss::result].isMember(jss::error) &&
-
654 jle[jss::result].isMember(jss::node) &&
-
655 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
-
656 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
-
-
658 jle[jss::result][jss::node][jss::Issuer] ==
-
-
660 jle[jss::result][jss::node][jss::Subject] ==
-
-
662 jle[jss::result][jss::node][
"CredentialType" ] ==
-
-
-
-
-
-
-
669 Env env{*
this , features};
-
-
671 env.fund(
XRP (5000), subject, issuer);
-
-
-
-
-
-
-
678 testcase (
"CredentialsAccept fail, invalid fee." );
-
-
-
-
-
683 testcase (
"CredentialsAccept fail, lsfAccepted already set." );
-
-
-
-
-
-
-
-
-
-
-
694 jle.isObject() && jle.isMember(jss::result) &&
-
695 !jle[jss::result].isMember(jss::error) &&
-
696 jle[jss::result].isMember(jss::node) &&
-
697 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
-
698 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
-
-
700 jle[jss::result][jss::node][jss::Issuer] ==
-
-
702 jle[jss::result][jss::node][jss::Subject] ==
-
-
704 jle[jss::result][jss::node][
"CredentialType" ] ==
-
-
-
-
-
709 char const credType2[] =
"efghi" ;
+
+
+
+
650 testcase (
"CredentialsAccept fail, invalid Issuer account." );
+
+
+
+
+
+
+
+
+
659 "CredentialsAccept fail, invalid credentialType param." );
+
+
+
+
+
+
+
666 Env env{*
this , features};
+
+
668 env.fund(
drops (env.current()->fees().accountReserve(1)), issuer);
+
669 env.fund(
drops (env.current()->fees().accountReserve(0)), subject);
+
+
+
+
673 testcase (
"CredentialsAccept fail, not enough reserve." );
+
+
+
+
+
+
+
+
+
+
+
+
685 jle.isObject() && jle.isMember(jss::result) &&
+
686 !jle[jss::result].isMember(jss::error) &&
+
687 jle[jss::result].isMember(jss::node) &&
+
688 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
+
689 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
+
+
691 jle[jss::result][jss::node][jss::Issuer] ==
+
+
693 jle[jss::result][jss::node][jss::Subject] ==
+
+
695 jle[jss::result][jss::node][
"CredentialType" ] ==
+
+
+
+
+
+
+
702 Env env{*
this , features};
+
+
704 env.fund(
XRP (5000), subject, issuer);
+
+
+
+
+
-
711 testcase (
"CredentialsAccept fail, expired credentials." );
-
-
713 uint32_t
const t = env.current()
-
-
715 .parentCloseTime.time_since_epoch()
-
-
717 jv[sfExpiration.jsonName] = t;
-
-
-
-
-
-
-
-
-
-
727 auto const jDelCred =
-
-
-
730 jDelCred.isObject() && jDelCred.isMember(jss::result) &&
-
731 jDelCred[jss::result].isMember(jss::error) &&
-
732 jDelCred[jss::result][jss::error] ==
"entryNotFound" );
-
-
-
-
-
-
-
-
-
741 Env env{*
this , features};
-
-
743 env.fund(
XRP (5000), issuer, subject, other);
-
-
-
-
747 testcase (
"CredentialsAccept fail, issuer doesn't exist." );
-
-
-
-
-
-
753 int const delta = env.seq(issuer) + 255;
-
754 for (
int i = 0; i < delta; ++i)
-
-
756 auto const acctDelFee{
drops (env.current()->fees().increment)};
-
+
711 testcase (
"CredentialsAccept fail, invalid fee." );
+
+
+
+
+
716 testcase (
"CredentialsAccept fail, lsfAccepted already set." );
+
+
+
+
+
+
+
+
+
+
+
727 jle.isObject() && jle.isMember(jss::result) &&
+
728 !jle[jss::result].isMember(jss::error) &&
+
729 jle[jss::result].isMember(jss::node) &&
+
730 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
+
731 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
+
+
733 jle[jss::result][jss::node][jss::Issuer] ==
+
+
735 jle[jss::result][jss::node][jss::Subject] ==
+
+
737 jle[jss::result][jss::node][
"CredentialType" ] ==
+
+
+
+
+
742 char const credType2[] =
"efghi" ;
+
+
744 testcase (
"CredentialsAccept fail, expired credentials." );
+
+
746 uint32_t
const t = env.current()
+
+
748 .parentCloseTime.time_since_epoch()
+
+
750 jv[sfExpiration.jsonName] = t;
+
+
+
+
+
+
+
-
-
-
-
-
-
-
765 auto const jDelCred =
-
-
-
768 jDelCred.isObject() && jDelCred.isMember(jss::result) &&
-
769 jDelCred[jss::result].isMember(jss::error) &&
-
770 jDelCred[jss::result][jss::error] ==
"entryNotFound" );
-
-
-
-
-
-
-
-
-
-
778 using namespace test::jtx;
-
-
780 char const credType[] =
"abcde" ;
-
781 Account const issuer{
"issuer" };
-
782 Account const subject{
"subject" };
-
+
+
760 auto const jDelCred =
+
+
+
763 jDelCred.isObject() && jDelCred.isMember(jss::result) &&
+
764 jDelCred[jss::result].isMember(jss::error) &&
+
765 jDelCred[jss::result][jss::error] ==
"entryNotFound" );
+
+
+
+
+
+
+
+
+
774 Env env{*
this , features};
+
+
776 env.fund(
XRP (5000), issuer, subject, other);
+
+
+
+
780 testcase (
"CredentialsAccept fail, issuer doesn't exist." );
+
+
+
-
-
-
787 Env env{*
this , features};
-
-
789 env.fund(
XRP (5000), subject, issuer, other);
-
+
+
786 int const delta = env.seq(issuer) + 255;
+
787 for (
int i = 0; i < delta; ++i)
+
+
789 auto const acctDelFee{
drops (env.current()->fees().increment)};
+
-
-
793 testcase (
"CredentialsDelete fail, no Credentials." );
-
-
-
-
-
-
-
800 testcase (
"CredentialsDelete fail, invalid Subject account." );
-
-
-
-
-
-
+
+
+
+
+
+
+
798 auto const jDelCred =
+
+
+
801 jDelCred.isObject() && jDelCred.isMember(jss::result) &&
+
802 jDelCred[jss::result].isMember(jss::error) &&
+
803 jDelCred[jss::result][jss::error] ==
"entryNotFound" );
+
+
+
+
-
-
809 testcase (
"CredentialsDelete fail, invalid Issuer account." );
-
-
-
-
-
-
-
-
-
-
819 "CredentialsDelete fail, invalid credentialType param." );
-
-
-
-
-
-
825 char const credType2[] =
"fghij" ;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
839 jle.isObject() && jle.isMember(jss::result) &&
-
840 !jle[jss::result].isMember(jss::error) &&
-
841 jle[jss::result].isMember(jss::node) &&
-
842 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
-
843 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
-
-
845 jle[jss::result][jss::node][jss::Issuer] ==
-
-
847 jle[jss::result][jss::node][jss::Subject] ==
-
-
849 jle[jss::result][jss::node][
"CredentialType" ] ==
-
-
-
-
-
854 testcase (
"CredentialsDelete fail, time not expired yet." );
-
-
-
-
858 uint32_t
const t = env.current()
-
-
860 .parentCloseTime.time_since_epoch()
-
-
-
863 jv[sfExpiration.jsonName] = t;
-
-
-
-
-
-
-
-
-
-
-
-
-
876 jle.isObject() && jle.isMember(jss::result) &&
-
877 !jle[jss::result].isMember(jss::error) &&
-
878 jle[jss::result].isMember(jss::node) &&
-
879 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
-
880 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
-
-
882 jle[jss::result][jss::node][jss::Issuer] ==
-
-
884 jle[jss::result][jss::node][jss::Subject] ==
-
-
886 jle[jss::result][jss::node][
"CredentialType" ] ==
-
-
-
-
-
891 testcase (
"CredentialsDelete fail, no Issuer and Subject." );
-
-
-
-
895 jv.removeMember(jss::Subject);
-
896 jv.removeMember(jss::Issuer);
-
+
+
+
+
+
811 using namespace test::jtx;
+
+
813 char const credType[] =
"abcde" ;
+
814 Account const issuer{
"issuer" };
+
815 Account const subject{
"subject" };
+
+
+
+
+
820 Env env{*
this , features};
+
+
822 env.fund(
XRP (5000), subject, issuer, other);
+
+
+
+
826 testcase (
"CredentialsDelete fail, no Credentials." );
+
+
+
+
+
+
+
833 testcase (
"CredentialsDelete fail, invalid Subject account." );
+
+
+
+
+
+
+
+
+
842 testcase (
"CredentialsDelete fail, invalid Issuer account." );
+
+
+
+
+
+
+
+
+
+
852 "CredentialsDelete fail, invalid credentialType param." );
+
+
+
+
+
+
858 char const credType2[] =
"fghij" ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
872 jle.isObject() && jle.isMember(jss::result) &&
+
873 !jle[jss::result].isMember(jss::error) &&
+
874 jle[jss::result].isMember(jss::node) &&
+
875 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
+
876 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
+
+
878 jle[jss::result][jss::node][jss::Issuer] ==
+
+
880 jle[jss::result][jss::node][jss::Subject] ==
+
+
882 jle[jss::result][jss::node][
"CredentialType" ] ==
+
+
+
+
+
887 testcase (
"CredentialsDelete fail, time not expired yet." );
+
+
+
+
891 uint32_t
const t = env.current()
+
+
893 .parentCloseTime.time_since_epoch()
+
+
+
896 jv[sfExpiration.jsonName] = t;
+
-
-
-
-
902 testcase (
"CredentialsDelete fail, invalid fee." );
-
-
-
-
-
-
-
-
-
-
912 testcase (
"deleteSLE fail, bad SLE." );
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
909 jle.isObject() && jle.isMember(jss::result) &&
+
910 !jle[jss::result].isMember(jss::error) &&
+
911 jle[jss::result].isMember(jss::node) &&
+
912 jle[jss::result][jss::node].isMember(
"LedgerEntryType" ) &&
+
913 jle[jss::result][jss::node][
"LedgerEntryType" ] ==
+
+
915 jle[jss::result][jss::node][jss::Issuer] ==
+
+
917 jle[jss::result][jss::node][jss::Subject] ==
+
+
919 jle[jss::result][jss::node][
"CredentialType" ] ==
+
+
+
+
+
924 testcase (
"CredentialsDelete fail, no Issuer and Subject." );
+
+
+
+
928 jv.removeMember(jss::Subject);
+
929 jv.removeMember(jss::Issuer);
+
+
+
+
+
+
935 testcase (
"CredentialsDelete fail, invalid fee." );
+
+
+
+
+
+
+
+
+
+
945 testcase (
"deleteSLE fail, bad SLE." );
+
+
+
+
+
+
+
+
-
-
-
-
-
-
925 using namespace test::jtx;
-
-
927 char const credType[] =
"abcde" ;
-
928 Account const issuer{
"issuer" };
-
929 Account const subject{
"subject" };
-
-
-
-
933 Env env{*
this , features};
-
-
935 env.fund(
XRP (5000), subject, issuer);
-
-
-
-
939 testcase (
"Credentials fail, Feature is not enabled." );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
953 using namespace test::jtx;
-
955 char const credType[] =
"abcde" ;
-
956 Account const issuer{
"issuer" };
-
957 Account const subject{
"subject" };
-
-
-
-
-
-
963 env.
fund (
XRP (5000), subject, issuer);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
977 params[jss::account] = subject.human();
-
978 auto const jv = env.rpc(
-
979 "json" ,
"account_tx" ,
to_string (params))[jss::result];
-
-
981 BEAST_EXPECT(jv[jss::transactions].size() == 4);
-
982 auto const & tx0(jv[jss::transactions][0u][jss::tx]);
-
-
984 tx0[jss::TransactionType] == jss::CredentialAccept);
-
985 auto const & tx1(jv[jss::transactions][1u][jss::tx]);
-
-
987 tx1[jss::TransactionType] == jss::CredentialCreate);
-
988 txHash0 = tx0[jss::hash].asString();
-
989 txHash1 = tx1[jss::hash].asString();
-
+
+
+
+
+
958 using namespace test::jtx;
+
+
960 char const credType[] =
"abcde" ;
+
961 Account const issuer{
"issuer" };
+
962 Account const subject{
"subject" };
+
+
+
+
966 Env env{*
this , features};
+
+
968 env.fund(
XRP (5000), subject, issuer);
+
+
+
+
972 testcase (
"Credentials fail, Feature is not enabled." );
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
986 using namespace test::jtx;
+
+
988 char const credType[] =
"abcde" ;
+
989 Account const issuer{
"issuer" };
+
990 Account const subject{
"subject" };
-
-
-
994 params[jss::account] = issuer.human();
-
995 auto const jv = env.rpc(
-
996 "json" ,
"account_tx" ,
to_string (params))[jss::result];
-
-
998 BEAST_EXPECT(jv[jss::transactions].size() == 4);
-
999 auto const & tx0(jv[jss::transactions][0u][jss::tx]);
-
-
1001 tx0[jss::TransactionType] == jss::CredentialAccept);
-
1002 auto const & tx1(jv[jss::transactions][1u][jss::tx]);
-
-
1004 tx1[jss::TransactionType] == jss::CredentialCreate);
-
-
1006 BEAST_EXPECT(txHash0 == tx0[jss::hash].asString());
-
1007 BEAST_EXPECT(txHash1 == tx1[jss::hash].asString());
-
-
-
-
-
-
-
1014 params[jss::account] = subject.human();
-
-
1016 "json" ,
"account_objects" ,
to_string (params))[jss::result];
-
-
1018 BEAST_EXPECT(jv[jss::account_objects].size() == 1);
-
1019 auto const & object(jv[jss::account_objects][0u]);
-
-
-
1022 object [
"LedgerEntryType" ].asString() == jss::Credential);
-
1023 objectIdx =
object [jss::index].asString();
-
-
-
-
-
1028 params[jss::account] = issuer.human();
-
-
1030 "json" ,
"account_objects" ,
to_string (params))[jss::result];
-
-
1032 BEAST_EXPECT(jv[jss::account_objects].size() == 1);
-
1033 auto const & object(jv[jss::account_objects][0u]);
-
-
-
1036 object [
"LedgerEntryType" ].asString() == jss::Credential);
-
1037 BEAST_EXPECT(objectIdx ==
object [jss::index].asString());
-
-
-
-
-
-
-
-
-
-
1045 using namespace test::jtx;
-
-
1047 bool const enabled = features[fixInvalidTxFlags];
-
-
-
1050 (enabled ?
"enabled" :
"disabled" ));
-
-
1052 char const credType[] =
"abcde" ;
-
1053 Account const issuer{
"issuer" };
-
1054 Account const subject{
"subject" };
-
-
-
1057 using namespace jtx;
-
1058 Env env{*
this , features};
-
-
1060 env.fund(
XRP (5000), subject, issuer);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
1082 using namespace test::jtx;
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
996 env.
fund (
XRP (5000), subject, issuer);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1010 params[jss::account] = subject.human();
+
1011 auto const jv = env.rpc(
+
1012 "json" ,
"account_tx" ,
to_string (params))[jss::result];
+
+
1014 BEAST_EXPECT(jv[jss::transactions].size() == 4);
+
1015 auto const & tx0(jv[jss::transactions][0u][jss::tx]);
+
+
1017 tx0[jss::TransactionType] == jss::CredentialAccept);
+
1018 auto const & tx1(jv[jss::transactions][1u][jss::tx]);
+
+
1020 tx1[jss::TransactionType] == jss::CredentialCreate);
+
1021 txHash0 = tx0[jss::hash].asString();
+
1022 txHash1 = tx1[jss::hash].asString();
+
+
+
+
+
1027 params[jss::account] = issuer.human();
+
1028 auto const jv = env.rpc(
+
1029 "json" ,
"account_tx" ,
to_string (params))[jss::result];
+
+
1031 BEAST_EXPECT(jv[jss::transactions].size() == 4);
+
1032 auto const & tx0(jv[jss::transactions][0u][jss::tx]);
+
+
1034 tx0[jss::TransactionType] == jss::CredentialAccept);
+
1035 auto const & tx1(jv[jss::transactions][1u][jss::tx]);
+
+
1037 tx1[jss::TransactionType] == jss::CredentialCreate);
+
+
1039 BEAST_EXPECT(txHash0 == tx0[jss::hash].asString());
+
1040 BEAST_EXPECT(txHash1 == tx1[jss::hash].asString());
+
+
+
+
+
+
+
1047 params[jss::account] = subject.human();
+
+
1049 "json" ,
"account_objects" ,
to_string (params))[jss::result];
+
+
1051 BEAST_EXPECT(jv[jss::account_objects].size() == 1);
+
1052 auto const & object(jv[jss::account_objects][0u]);
+
+
+
1055 object [
"LedgerEntryType" ].asString() == jss::Credential);
+
1056 objectIdx =
object [jss::index].asString();
+
+
+
+
+
1061 params[jss::account] = issuer.human();
+
+
1063 "json" ,
"account_objects" ,
to_string (params))[jss::result];
+
+
1065 BEAST_EXPECT(jv[jss::account_objects].size() == 1);
+
1066 auto const & object(jv[jss::account_objects][0u]);
+
+
+
1069 object [
"LedgerEntryType" ].asString() == jss::Credential);
+
1070 BEAST_EXPECT(objectIdx ==
object [jss::index].asString());
+
+
+
+
+
+
+
+
+
1078 using namespace test::jtx;
+
+
1080 bool const enabled = features[fixInvalidTxFlags];
+
+
+
1083 (enabled ?
"enabled" :
"disabled" ));
+
+
1085 char const credType[] =
"abcde" ;
+
1086 Account const issuer{
"issuer" };
+
1087 Account const subject{
"subject" };
+
+
+
1090 using namespace jtx;
+
1091 Env env{*
this , features};
+
+
1093 env.fund(
XRP (5000), subject, issuer);
+
-
1096 BEAST_DEFINE_TESTSUITE(Credentials, app,
ripple );
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
1115 using namespace test::jtx;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1130 BEAST_DEFINE_TESTSUITE(Credentials, app,
ripple );
+
+
+
@@ -1212,14 +1246,21 @@ $(document).ready(function() { init_codefold(0); });
Set the expected result code for a JTx The test will fail if the code doesn't match.
+Set a ticket sequence on a JTx.
+
TER deleteSLE(ApplyView &view, std::shared_ptr< SLE > const &sleCredential, beast::Journal j)
+Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Json::Value create(jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
Json::Value accept(jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
Keylet keylet(test::jtx::Account const &subject, test::jtx::Account const &issuer, std::string_view credType)
Json::Value deleteCred(jtx::Account const &acc, jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
Json::Value ledgerEntry(jtx::Env &env, jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
+auto bumpLastPage(Env &env, std::uint64_t newLastPage, Keylet directory, std::function< bool(ApplyView &, uint256, std::uint64_t)> adjust) -> Expected< void, Error >
Move the position of the last page in the user's directory on open ledger to newLastPage.
+auto maximumPageIndex(Env const &env) -> std::uint64_t
+bool adjustOwnerNode(ApplyView &view, uint256 key, std::uint64_t page)
Implementation of adjust for the most common ledger entry, i.e.
+Json::Value create(Account const &account, std::uint32_t count)
Create one of more tickets.
std::uint32_t ownerCount(Env const &env, Account const &account)
PrettyAmount drops(Integer i)
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
bool checkVL(Slice const &result, std::string const &expected)
@@ -1229,22 +1270,24 @@ $(document).ready(function() { init_codefold(0); });
static XRPAmount reserve(jtx::Env &env, std::uint32_t count)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
AccountID const & xrpAccount()
Compute AccountID from public key.
-std::size_t constexpr maxCredentialURILength
The maximum length of a URI inside a Credential.
+std::size_t constexpr maxCredentialURILength
The maximum length of a URI inside a Credential.
constexpr std::uint32_t const tfSellNFToken
constexpr std::uint32_t tfPassive
std::string strHex(FwdIt begin, FwdIt end)
-std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
+std::size_t constexpr maxCredentialTypeLength
The maximum length of a CredentialType inside a Credential.
+
@ tecINSUFFICIENT_RESERVE
std::string to_string(base_uint< Bits, Tag > const &a)
+
TERSubset< CanCvtToTER > TER
constexpr std::uint32_t const tfTransferable
@@ -1256,14 +1299,14 @@ $(document).ready(function() { init_codefold(0); });
-void testAcceptFailed(FeatureBitset features)
+void testAcceptFailed(FeatureBitset features)
void testSuccessful(FeatureBitset features)
-void testDeleteFailed(FeatureBitset features)
-void testFeatureFailed(FeatureBitset features)
-
-void testFlags(FeatureBitset features)
+void testDeleteFailed(FeatureBitset features)
+void testFeatureFailed(FeatureBitset features)
+
+void testFlags(FeatureBitset features)
void testCredentialsDelete(FeatureBitset features)
-void run() override
Runs the suite.
+void run() override
Runs the suite.
void testCreateFailed(FeatureBitset features)
diff --git a/DID_8cpp_source.html b/DID_8cpp_source.html
index a76ef0837b..c70415363d 100644
--- a/DID_8cpp_source.html
+++ b/DID_8cpp_source.html
@@ -319,7 +319,7 @@ $(document).ready(function() { init_codefold(0); });
Writeable view to a ledger, for applying a transaction.
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
std::optional< std::uint64_t > dirInsert(Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Insert an entry to a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
@@ -346,12 +346,12 @@ $(document).ready(function() { init_codefold(0); });
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-std::size_t constexpr maxDIDURILength
The maximum length of a URI inside a DID.
-std::size_t constexpr maxDIDAttestationLength
The maximum length of an Attestation inside a DID.
+std::size_t constexpr maxDIDURILength
The maximum length of a URI inside a DID.
+std::size_t constexpr maxDIDAttestationLength
The maximum length of an Attestation inside a DID.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
TER addSLE(ApplyContext &ctx, std::shared_ptr< SLE > const &sle, AccountID const &owner)
bool set(T &target, std::string const &name, Section const §ion)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
-std::size_t constexpr maxDIDDocumentLength
The maximum length of a Data element inside a DID.
+std::size_t constexpr maxDIDDocumentLength
The maximum length of a Data element inside a DID.
std::function< void(SLE::ref)> describeOwnerDir(AccountID const &account)
diff --git a/DelegateSet_8cpp_source.html b/DelegateSet_8cpp_source.html
index b958c26381..be6ddb1df2 100644
--- a/DelegateSet_8cpp_source.html
+++ b/DelegateSet_8cpp_source.html
@@ -268,7 +268,7 @@ $(document).ready(function() { init_codefold(0); });
Writeable view to a ledger, for applying a transaction.
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
std::optional< std::uint64_t > dirInsert(Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Insert an entry to a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
@@ -298,7 +298,7 @@ $(document).ready(function() { init_codefold(0); });
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-std::size_t constexpr permissionMaxSize
The maximum number of delegate permissions an account can grant.
+std::size_t constexpr permissionMaxSize
The maximum number of delegate permissions an account can grant.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
std::function< void(SLE::ref)> describeOwnerDir(AccountID const &account)
diff --git a/DeleteAccount_8cpp_source.html b/DeleteAccount_8cpp_source.html
index e1f72a0bda..ef4390f7be 100644
--- a/DeleteAccount_8cpp_source.html
+++ b/DeleteAccount_8cpp_source.html
@@ -593,7 +593,7 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
-std::size_t constexpr maxDeletableDirEntries
The maximum number of owner directory entries for account to be deletable.
+std::size_t constexpr maxDeletableDirEntries
The maximum number of owner directory entries for account to be deletable.
static TER removeSignersFromLedger(Application &app, ApplyView &view, Keylet const &accountKeylet, Keylet const &ownerDirKeylet, Keylet const &signerListKeylet, beast::Journal j)
diff --git a/DeleteOracle_8cpp_source.html b/DeleteOracle_8cpp_source.html
index 6b49f30246..154079a1ca 100644
--- a/DeleteOracle_8cpp_source.html
+++ b/DeleteOracle_8cpp_source.html
@@ -197,7 +197,7 @@ $(document).ready(function() { init_codefold(0); });
Writeable view to a ledger, for applying a transaction.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
static TER deleteOracle(ApplyView &view, std::shared_ptr< SLE > const &sle, AccountID const &account, beast::Journal j)
diff --git a/DeliveredAmount_8h_source.html b/DeliveredAmount_8h_source.html
index 7fdb0e21dd..abdb619cb2 100644
--- a/DeliveredAmount_8h_source.html
+++ b/DeliveredAmount_8h_source.html
@@ -163,7 +163,7 @@ $(document).ready(function() { init_codefold(0); });
std::optional< STAmount > getDeliveredAmount(RPC::Context const &context, std::shared_ptr< STTx const > const &serializedTx, TxMeta const &transactionMeta, LedgerIndex const &ledgerIndex)
void insertDeliveredAmount(Json::Value &meta, ReadView const &, std::shared_ptr< STTx const > const &serializedTx, TxMeta const &)
Add a delivered_amount field to the meta input/output parameter.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-std::uint32_t LedgerIndex
A ledger index.
+std::uint32_t LedgerIndex
A ledger index.
diff --git a/DepositAuthorized_8cpp_source.html b/DepositAuthorized_8cpp_source.html
index 3324d6a873..a950e29594 100644
--- a/DepositAuthorized_8cpp_source.html
+++ b/DepositAuthorized_8cpp_source.html
@@ -312,7 +312,7 @@ $(document).ready(function() { init_codefold(0); });
Json::Value rpcError(int iError)
Json::Value doDepositAuthorized(RPC::JsonContext &context)
-std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
+std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
diff --git a/DepositAuthorized__test_8cpp_source.html b/DepositAuthorized__test_8cpp_source.html
index c82cac7d0e..7ee45a152d 100644
--- a/DepositAuthorized__test_8cpp_source.html
+++ b/DepositAuthorized__test_8cpp_source.html
@@ -777,7 +777,7 @@ $(document).ready(function() { init_codefold(0); });
XRP_t const XRP
Converts to XRP Issue or STAmount.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::uint32_t asfDepositAuth
-std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
+std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
static bool authorized(Port const &port, std::map< std::string, std::string > const &h)
diff --git a/DepositPreauth_8cpp_source.html b/DepositPreauth_8cpp_source.html
index 298e602353..96b42df2e8 100644
--- a/DepositPreauth_8cpp_source.html
+++ b/DepositPreauth_8cpp_source.html
@@ -418,7 +418,7 @@ $(document).ready(function() { init_codefold(0); });
Writeable view to a ledger, for applying a transaction.
-bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
std::optional< std::uint64_t > dirInsert(Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Insert an entry to a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
@@ -457,7 +457,7 @@ $(document).ready(function() { init_codefold(0); });
std::function< void(SLE::ref)> describeOwnerDir(AccountID const &account)
-std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
+std::size_t constexpr maxCredentialsArraySize
The maximum number of credentials can be passed in array.
diff --git a/Directory__test_8cpp_source.html b/Directory__test_8cpp_source.html
index bb854294f7..c13c52869e 100644
--- a/Directory__test_8cpp_source.html
+++ b/Directory__test_8cpp_source.html
@@ -105,515 +105,608 @@ $(document).ready(function() { init_codefold(0); });
22 #include <xrpl/ledger/Sandbox.h>
23 #include <xrpl/protocol/Feature.h>
24 #include <xrpl/protocol/Protocol.h>
- 25 #include <xrpl/protocol/jss.h>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
39 BEAST_EXPECT(i < 17577);
-
-
+
25 #include <xrpl/protocol/TER.h>
+
26 #include <xrpl/protocol/jss.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
41 BEAST_EXPECT(i < 17577);
-
43 for (
int j = 0; j != 3; ++j)
-
-
-
-
-
-
-
+
+
+
45 for (
int j = 0; j != 3; ++j)
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
64 p->setFieldU64(sfIndexNext, 0);
-
-
66 p->setFieldU64(sfIndexNext, i + 1);
-
-
-
69 p->setFieldU64(sfIndexPrevious, n - 1);
-
-
71 p->setFieldU64(sfIndexPrevious, i - 1);
-
-
-
-
+
+
+
+
66 p->setFieldU64(sfIndexNext, 0);
+
+
68 p->setFieldU64(sfIndexNext, i + 1);
+
+
+
71 p->setFieldU64(sfIndexPrevious, n - 1);
+
+
73 p->setFieldU64(sfIndexPrevious, i - 1);
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
87 testcase (
"Directory Ordering (with 'SortedDirectories' amendment)" );
+
+
+
+
+
+
+
+
+
+
+
-
-
90 env.
fund (
XRP (10000000), alice, gw);
-
-
-
-
-
-
-
-
-
-
-
101 auto const view = env.
closed ();
-
-
+
89 testcase (
"Directory Ordering (with 'SortedDirectories' amendment)" );
+
+
+
92 env.
fund (
XRP (10000000), alice, gw);
+
+
+
+
+
+
+
+
+
+
+
103 auto const view = env.
closed ();
-
-
-
-
-
-
-
111 auto const & v = p->getFieldV256(sfIndexes);
-
-
-
-
-
-
-
-
-
120 for (
auto const & e : v)
-
-
-
-
124 BEAST_EXPECT(c->getFieldU32(sfSequence) >= minSeq);
-
125 BEAST_EXPECT(c->getFieldU32(sfSequence) < maxSeq);
-
-
-
128 page = p->getFieldU64(sfIndexNext);
-
-
-
-
-
-
-
-
-
-
138 for (
auto const &
offer : book)
-
-
-
141 BEAST_EXPECT(
offer ->getFieldAmount(sfTakerPays) == USD(count));
-
142 BEAST_EXPECT(
offer ->getFieldAmount(sfTakerGets) ==
XRP (count));
-
-
+
+
+
+
+
+
+
+
+
113 auto const & v = p->getFieldV256(sfIndexes);
+
+
+
+
+
+
+
+
+
122 for (
auto const & e : v)
+
+
+
+
126 BEAST_EXPECT(c->getFieldU32(sfSequence) >= minSeq);
+
127 BEAST_EXPECT(c->getFieldU32(sfSequence) < maxSeq);
+
+
+
130 page = p->getFieldU64(sfIndexNext);
+
+
+
+
+
+
+
+
+
+
140 for (
auto const &
offer : book)
+
+
+
143 BEAST_EXPECT(
offer ->getFieldAmount(sfTakerPays) == USD(count));
+
144 BEAST_EXPECT(
offer ->getFieldAmount(sfTakerGets) ==
XRP (count));
+
+
-
-
-
-
-
-
-
-
-
152 auto const alice =
Account (
"alice" );
-
153 auto const bob =
Account (
"bob" );
-
154 auto const charlie =
Account (
"charlie" );
-
-
-
+
+
+
+
+
+
+
+
+
154 auto const alice =
Account (
"alice" );
+
155 auto const bob =
Account (
"bob" );
+
156 auto const charlie =
Account (
"charlie" );
+
-
159 env.
fund (
XRP (1000000), alice, charlie, gw);
-
-
-
-
-
-
-
166 env(
signers (alice, 1, {{bob, 1}}));
-
-
-
-
-
-
-
-
-
-
-
+
+
+
161 env.
fund (
XRP (1000000), alice, charlie, gw);
+
+
+
+
+
+
+
168 env(
signers (alice, 1, {{bob, 1}}));
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
188 auto cl = currencies;
-
-
190 for (
auto const & c : cl)
-
-
192 env(
trust (alice, c(50)));
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
190 auto cl = currencies;
+
+
192 for (
auto const & c : cl)
+
+
194 env(
trust (alice, c(50)));
+
+
-
+
-
200 for (
auto const & c : cl)
-
-
202 env(
trust (alice, c(0)));
-
-
-
-
-
-
-
-
-
-
212 auto cl = currencies;
-
-
+
+
+
202 for (
auto const & c : cl)
+
+
204 env(
trust (alice, c(0)));
+
+
+
+
+
+
+
+
+
+
214 auto cl = currencies;
-
216 for (
auto c : currencies)
-
-
218 env(
trust (charlie, c(50)));
-
-
220 env(
pay (gw, charlie, c(50)));
+
+
+
218 for (
auto c : currencies)
+
+
220 env(
trust (charlie, c(50)));
-
+
222 env(
pay (gw, charlie, c(50)));
-
-
-
+
+
+
-
-
-
-
-
-
233 for (
auto const & c : cl)
-
-
235 env(
offer (charlie,
XRP (50), c(50)));
-
-
-
-
-
-
-
-
-
244 for (
auto const & c : cl)
-
-
246 env(
pay (alice, charlie, c(50)));
-
-
-
-
-
-
+
+
+
+
+
+
+
+
235 for (
auto const & c : cl)
+
+
237 env(
offer (charlie,
XRP (50), c(50)));
+
+
+
+
+
+
+
+
+
246 for (
auto const & c : cl)
+
+
248 env(
pay (alice, charlie, c(50)));
+
+
+
+
+
+
-
-
-
-
-
-
257 testcase (
"RIPD-1353 Empty Offer Directories" );
-
-
-
-
-
262 auto const gw =
Account {
"gateway" };
-
263 auto const alice =
Account {
"alice" };
-
264 auto const USD = gw[
"USD" ];
-
-
266 env.
fund (
XRP (10000), alice, gw);
-
-
268 env.
trust (USD(1000), alice);
-
269 env(
pay (gw, alice, USD(1000)));
-
-
271 auto const firstOfferSeq = env.
seq (alice);
+
+
+
+
+
+
259 testcase (
"RIPD-1353 Empty Offer Directories" );
+
+
+
+
+
264 auto const gw =
Account {
"gateway" };
+
265 auto const alice =
Account {
"alice" };
+
266 auto const USD = gw[
"USD" ];
+
+
268 env.
fund (
XRP (10000), alice, gw);
+
+
270 env.
trust (USD(1000), alice);
+
271 env(
pay (gw, alice, USD(1000)));
-
-
274 for (
int i = 0; i < 3; ++i)
-
-
-
-
-
-
280 for (
auto page : {0, 2, 1})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
305 env.
trust (USD(0), alice);
-
306 env(
pay (alice, gw, alice[
"USD" ](1000)));
-
-
-
-
+
273 auto const firstOfferSeq = env.
seq (alice);
+
+
+
276 for (
int i = 0; i < 3; ++i)
+
+
+
+
+
+
282 for (
auto page : {0, 2, 1})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
307 env.
trust (USD(0), alice);
+
308 env(
pay (alice, gw, alice[
"USD" ](1000)));
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
320 auto const gw =
Account {
"gateway" };
-
321 auto const alice =
Account {
"alice" };
-
322 auto const USD = gw[
"USD" ];
-
-
-
-
-
-
328 "fb71c9aa3310141da4b01d6c744a98286af2d72ab5448d5adc0910ca0c910880" );
-
-
-
331 "bad0f021aa3b2f6754a8fe82a5779730aa0bbbab82f17201ef24900efc2c7312" );
-
-
-
-
-
-
-
-
-
-
-
-
-
-
345 p->setFieldV256(sfIndexes, v);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
370 p1->setFieldV256(sfIndexes, v1);
-
-
-
-
-
-
-
-
378 p2->setFieldV256(sfIndexes, v2);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
392 BEAST_EXPECT(p1->getFieldU64(sfIndexNext) == 0);
-
393 BEAST_EXPECT(p1->getFieldU64(sfIndexPrevious) == 0);
-
-
-
-
397 BEAST_EXPECT(p0->getFieldU64(sfIndexNext) == 1);
-
398 BEAST_EXPECT(p0->getFieldU64(sfIndexPrevious) == 1);
-
-
+
+
+
+
+
+
+
+
+
+
+
322 auto const gw =
Account {
"gateway" };
+
323 auto const alice =
Account {
"alice" };
+
324 auto const USD = gw[
"USD" ];
+
+
+
+
+
+
330 "fb71c9aa3310141da4b01d6c744a98286af2d72ab5448d5adc0910ca0c910880" );
+
+
+
333 "bad0f021aa3b2f6754a8fe82a5779730aa0bbbab82f17201ef24900efc2c7312" );
+
+
+
+
+
+
+
+
+
+
+
+
+
+
347 p->setFieldV256(sfIndexes, v);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
372 p1->setFieldV256(sfIndexes, v1);
+
+
+
+
+
+
+
+
380 p2->setFieldV256(sfIndexes, v2);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
394 BEAST_EXPECT(p1->getFieldU64(sfIndexNext) == 0);
+
395 BEAST_EXPECT(p1->getFieldU64(sfIndexPrevious) == 0);
+
+
+
+
399 BEAST_EXPECT(p0->getFieldU64(sfIndexNext) == 1);
+
400 BEAST_EXPECT(p0->getFieldU64(sfIndexPrevious) == 1);
+
+
-
-
-
-
-
-
-
-
-
408 auto const gw =
Account {
"gateway" };
-
409 auto const alice =
Account {
"alice" };
-
410 auto const USD = gw[
"USD" ];
-
-
412 auto ledger_data = [
this ](
Env & env) {
-
-
414 params[jss::type] = jss::directory;
-
415 params[jss::ledger_index] =
"validated" ;
-
-
417 env.rpc(
"json" ,
"ledger_data" ,
to_string (params))[jss::result];
-
418 BEAST_EXPECT(!result.isMember(jss::marker));
-
-
-
-
-
-
424 env.
fund (
XRP (10000), alice, gw);
-
-
426 env.
trust (USD(1000), alice);
-
427 env(
pay (gw, alice, USD(1000)));
-
-
-
-
431 auto const jrr = ledger_data(env);
-
432 auto const & jstate = jrr[jss::state];
-
-
434 for (
auto const & directory : jstate)
-
-
-
437 directory[
"LedgerEntryType" ] ==
-
-
-
-
441 BEAST_EXPECT(!directory.isMember(
"PreviousTxnID" ));
-
442 BEAST_EXPECT(!directory.isMember(
"PreviousTxnLgrSeq" ));
-
-
-
-
-
-
-
-
-
-
-
453 auto const txID =
to_string (env.
tx ()->getTransactionID());
-
454 auto const ledgerSeq = env.
current ()->info().seq;
-
-
-
-
-
-
-
461 auto const jrr = ledger_data(env);
-
462 auto const & jstate = jrr[jss::state];
-
-
464 for (
auto const & directory : jstate)
-
-
-
467 directory[
"LedgerEntryType" ] ==
-
-
469 if (directory[jss::Owner] == gw.human())
-
-
-
-
473 BEAST_EXPECT(!directory.isMember(
"PreviousTxnID" ));
-
474 BEAST_EXPECT(!directory.isMember(
"PreviousTxnLgrSeq" ));
-
-
-
-
-
-
-
-
482 directory.isMember(
"PreviousTxnID" ) &&
-
483 directory[
"PreviousTxnID" ].asString() == txID);
-
-
485 directory.isMember(
"PreviousTxnLgrSeq" ) &&
-
486 directory[
"PreviousTxnLgrSeq" ].asUInt() == ledgerSeq);
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
410 auto const gw =
Account {
"gateway" };
+
411 auto const alice =
Account {
"alice" };
+
412 auto const USD = gw[
"USD" ];
+
+
414 auto ledger_data = [
this ](
Env & env) {
+
+
416 params[jss::type] = jss::directory;
+
417 params[jss::ledger_index] =
"validated" ;
+
+
419 env.rpc(
"json" ,
"ledger_data" ,
to_string (params))[jss::result];
+
420 BEAST_EXPECT(!result.isMember(jss::marker));
+
+
+
+
+
+
426 env.
fund (
XRP (10000), alice, gw);
+
+
428 env.
trust (USD(1000), alice);
+
429 env(
pay (gw, alice, USD(1000)));
+
+
+
+
433 auto const jrr = ledger_data(env);
+
434 auto const & jstate = jrr[jss::state];
+
+
436 for (
auto const & directory : jstate)
+
+
+
439 directory[
"LedgerEntryType" ] ==
+
+
+
+
443 BEAST_EXPECT(!directory.isMember(
"PreviousTxnID" ));
+
444 BEAST_EXPECT(!directory.isMember(
"PreviousTxnLgrSeq" ));
+
+
+
+
+
+
+
+
+
+
+
455 auto const txID =
to_string (env.
tx ()->getTransactionID());
+
456 auto const ledgerSeq = env.
current ()->info().seq;
+
+
+
+
+
+
+
463 auto const jrr = ledger_data(env);
+
464 auto const & jstate = jrr[jss::state];
+
+
466 for (
auto const & directory : jstate)
+
+
+
469 directory[
"LedgerEntryType" ] ==
+
+
471 if (directory[jss::Owner] == gw.human())
+
+
+
+
475 BEAST_EXPECT(!directory.isMember(
"PreviousTxnID" ));
+
476 BEAST_EXPECT(!directory.isMember(
"PreviousTxnLgrSeq" ));
+
+
+
+
+
+
+
+
484 directory.isMember(
"PreviousTxnID" ) &&
+
485 directory[
"PreviousTxnID" ].asString() == txID);
+
+
487 directory.isMember(
"PreviousTxnLgrSeq" ) &&
+
488 directory[
"PreviousTxnLgrSeq" ].asUInt() == ledgerSeq);
+
+
+
+
+
+
+
+
+
+
497 using namespace test::jtx;
+
+
+
500 auto const testCase = [&,
this ](
FeatureBitset features,
auto setup) {
+
501 using namespace test::jtx;
-
-
-
-
+
503 Env env(*
this , features);
+
+
+
+
507 auto const [lastPage, full] = setup(env);
+
+
+
510 for (
int i = 0; i < 63; ++i)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
524 auto sle = view.peek({ltCREDENTIAL, key});
+
525 if (!BEAST_EXPECT(sle))
+
+
+
528 BEAST_EXPECT(page == lastPage);
+
529 sle->setFieldU64(sfIssuerNode, page);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
544 for (
int i = 0; i < 64; ++i)
+
+
+
+
+
+
+
+
+
553 BEAST_EXPECT(sle ==
nullptr );
+
+
+
+
+
+
+
+
+
562 testcase (
"directory full without fixDirectoryLimit" );
+
+
+
+
+
+
568 testcase (
"directory not full with fixDirectoryLimit" );
+
+
+
+
+
+
574 testcase (
"directory full with fixDirectoryLimit" );
+
+
+
+
+
+
+
+
+
+
582 testDirectoryOrdering();
+
+
+
+
+
+
+
+
+
+
+
+
+
+
testcase_t testcase
Memberspace for declaring test cases.
-
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+
Writeable view to a ledger, for applying a transaction.
+
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
+
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+
void push_back(uint256 const &v)
Discardable, editable view to a ledger.
@@ -623,6 +716,7 @@ $(document).ready(function() { init_codefold(0); });
std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const override
Return the key of the next state item.
std::shared_ptr< SLE > peek(Keylet const &k) override
Prepare to modify the SLE associated with key.
Immutable cryptographic account descriptor.
+
AccountID id() const
Returns the Account ID.
A transaction testing environment.
std::shared_ptr< ReadView const > closed()
Returns the last closed ledger.
std::uint32_t seq(Account const &account) const
Returns the next sequence number on account.
@@ -632,13 +726,19 @@ $(document).ready(function() { init_codefold(0); });
void trust(STAmount const &amount, Account const &account)
Establish trust lines.
void enableFeature(uint256 const feature)
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
+
Set the expected result code for a JTx The test will fail if the code doesn't match.
+
+
Keylet child(uint256 const &key) noexcept
Any item that can be in an owner dir.
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
Keylet unchecked(uint256 const &key) noexcept
Any ledger entry.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
+
Json::Value create(jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
+
Json::Value deleteCred(jtx::Account const &acc, jtx::Account const &subject, jtx::Account const &issuer, std::string_view credType)
+
auto bumpLastPage(Env &env, std::uint64_t newLastPage, Keylet directory, std::function< bool(ApplyView &, uint256, std::uint64_t)> adjust) -> Expected< void, Error >
Move the position of the last page in the user's directory on open ledger to newLastPage.
bool checkArraySize(Json::Value const &val, unsigned int size)
Json::Value signers(Account const &account, std::uint32_t quorum, std::vector< signer > const &v)
@@ -650,8 +750,11 @@ $(document).ready(function() { init_codefold(0); });
Json::Value offer_cancel(Account const &account, std::uint32_t offerSeq)
Cancel an offer.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
+
std::uint64_t constexpr dirNodeMaxPages
The maximum number of pages allowed in a directory.
bool dirIsEmpty(ReadView const &view, Keylet const &k)
Returns true if the directory is empty.
+
std::size_t constexpr dirNodeMaxEntries
The maximum number of entries per directory page.
+
uint256 getQualityNext(uint256 const &uBase)
std::string to_string(base_uint< Bits, Tag > const &a)
@@ -663,15 +766,18 @@ $(document).ready(function() { init_codefold(0); });
-
-
std::string currcode(std::size_t i)
-
-
-
void makePages(Sandbox &sb, uint256 const &base, std::uint64_t n)
-
void testDirectoryOrdering()
-
void run() override
Runs the suite.
-
-
+
+
std::string currcode(std::size_t i)
+
+
+
void makePages(Sandbox &sb, uint256 const &base, std::uint64_t n)
+
void testDirectoryOrdering()
+
void run() override
Runs the suite.
+
+
+
+
+
diff --git a/EscrowToken__test_8cpp_source.html b/EscrowToken__test_8cpp_source.html
index 0a9b6f4591..47d89418bf 100644
--- a/EscrowToken__test_8cpp_source.html
+++ b/EscrowToken__test_8cpp_source.html
@@ -4187,7 +4187,7 @@ $(document).ready(function() { init_codefold(0); });
constexpr std::uint32_t tfSetDeepFreeze
constexpr std::uint32_t asfAllowTrustLineLocking
constexpr std::uint32_t const tfMPTCanTransfer
-
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
+
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
constexpr std::uint32_t const tfMPTUnauthorize
diff --git a/Escrow_8cpp_source.html b/Escrow_8cpp_source.html
index ba35b14817..6940d5bdc7 100644
--- a/Escrow_8cpp_source.html
+++ b/Escrow_8cpp_source.html
@@ -1502,7 +1502,7 @@ $(document).ready(function() { init_codefold(0); });
Writeable view to a ledger, for applying a transaction.
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
-
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
std::optional< std::uint64_t > dirInsert(Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Insert an entry to a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
diff --git a/GetAggregatePrice_8cpp_source.html b/GetAggregatePrice_8cpp_source.html
index e39543881e..1bc92dbbf8 100644
--- a/GetAggregatePrice_8cpp_source.html
+++ b/GetAggregatePrice_8cpp_source.html
@@ -498,7 +498,7 @@ $(document).ready(function() { init_codefold(0); });
-
std::size_t constexpr maxTrim
The maximum percentage of outliers to trim.
+
std::size_t constexpr maxTrim
The maximum percentage of outliers to trim.
Issue const & noIssue()
Returns an asset specifier that represents no account and currency.
bimap< multiset_of< std::uint32_t, std::greater< std::uint32_t > >, multiset_of< STAmount > > Prices
static void iteratePriceData(RPC::JsonContext &context, std::shared_ptr< SLE const > const &sle, std::function< bool(STObject const &)> &&f)
Calls callback "f" on the ledger-object sle and up to three previous metadata objects.
diff --git a/InvariantCheck_8cpp_source.html b/InvariantCheck_8cpp_source.html
index 6a3d5e60db..db1363ebb7 100644
--- a/InvariantCheck_8cpp_source.html
+++ b/InvariantCheck_8cpp_source.html
@@ -3507,10 +3507,10 @@ $(document).ready(function() { init_codefold(0); });
constexpr base_uint< Bits, Tag > operator|(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
static bool validBalances(STAmount const &amount, STAmount const &amount2, STAmount const &lptAMMBalance, ValidAMM::ZeroAllowed zeroAllowed)
-
std::size_t constexpr maxPermissionedDomainCredentialsArraySize
The maximum number of credentials can be passed in array for permissioned domain.
+
std::size_t constexpr maxPermissionedDomainCredentialsArraySize
The maximum number of credentials can be passed in array for permissioned domain.
bool hasPrivilege(STTx const &tx, Privilege priv)
constexpr std::enable_if_t< std::is_integral_v< Dest > &&std::is_integral_v< Src >, Dest > safe_cast(Src s) noexcept
-
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
+
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
@@ -3536,7 +3536,7 @@ $(document).ready(function() { init_codefold(0); });
-
std::size_t constexpr dirMaxTokensPerPage
The maximum number of items in an NFT page.
+
std::size_t constexpr dirMaxTokensPerPage
The maximum number of items in an NFT page.
Buffer sign(PublicKey const &pk, SecretKey const &sk, Slice const &message)
Generate a signature for a message.
std::array< keyletDesc< AccountID const & >, 6 > const directAccountKeylets
std::pair< STAmount, STAmount > ammPoolHolds(ReadView const &view, AccountID const &ammAccountID, Issue const &issue1, Issue const &issue2, FreezeHandling freezeHandling, beast::Journal const j)
Get AMM pool balances.
diff --git a/Invariants__test_8cpp_source.html b/Invariants__test_8cpp_source.html
index a9331b27e3..1b93fcd4ca 100644
--- a/Invariants__test_8cpp_source.html
+++ b/Invariants__test_8cpp_source.html
@@ -3727,8 +3727,8 @@ $(document).ready(function() { init_codefold(0); });
constexpr std::uint32_t tfSetDeepFreeze
constexpr std::uint32_t const tfMPTCanTransfer
-
std::size_t constexpr maxPermissionedDomainCredentialsArraySize
The maximum number of credentials can be passed in array for permissioned domain.
-
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
+
std::size_t constexpr maxPermissionedDomainCredentialsArraySize
The maximum number of credentials can be passed in array for permissioned domain.
+
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
base_uint< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
@@ -3751,7 +3751,7 @@ $(document).ready(function() { init_codefold(0); });
AccountID pseudoAccountAddress(ReadView const &view, uint256 const &pseudoOwnerKey)
std::string to_string(base_uint< Bits, Tag > const &a)
LedgerEntryType
Identifiers for on-ledger objects.
-
std::uint8_t constexpr vaultStrategyFirstComeFirstServe
Vault withdrawal policies.
+
std::uint8_t constexpr vaultStrategyFirstComeFirstServe
Vault withdrawal policies.
MPTID makeMptID(std::uint32_t sequence, AccountID const &account)
diff --git a/KeyCache__test_8cpp_source.html b/KeyCache__test_8cpp_source.html
index a10c77ca24..9b76b8c35e 100644
--- a/KeyCache__test_8cpp_source.html
+++ b/KeyCache__test_8cpp_source.html
@@ -191,7 +191,7 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-
std::uint32_t LedgerIndex
A ledger index.
+
std::uint32_t LedgerIndex
A ledger index.
diff --git a/RCLCxLedger_8h_source.html b/RCLCxLedger_8h_source.html
index 7793d165c3..cd7ff48c3a 100644
--- a/RCLCxLedger_8h_source.html
+++ b/RCLCxLedger_8h_source.html
@@ -215,7 +215,7 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool getCloseAgree(LedgerHeader const &info)
-
std::uint32_t LedgerIndex
A ledger index.
+
std::uint32_t LedgerIndex
A ledger index.
Json::Value getJson(LedgerFill const &fill)
Return a new Json::Value representing the ledger with given options.
diff --git a/RCLValidations_8h_source.html b/RCLValidations_8h_source.html
index 0b444df91c..627a809f69 100644
--- a/RCLValidations_8h_source.html
+++ b/RCLValidations_8h_source.html
@@ -368,7 +368,7 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-
std::uint32_t LedgerIndex
A ledger index.
+
std::uint32_t LedgerIndex
A ledger index.
base_uint< 160, detail::NodeIDTag > NodeID
NodeID is a 160-bit hash representing one node.
void handleNewValidation(Application &app, std::shared_ptr< STValidation > const &val, std::string const &source, BypassAccept const bypassAccept, std::optional< beast::Journal > j)
Handle a new validation.
diff --git a/STAmount_8cpp_source.html b/STAmount_8cpp_source.html
index 07f5bbb833..c02cbd2a1c 100644
--- a/STAmount_8cpp_source.html
+++ b/STAmount_8cpp_source.html
@@ -2029,7 +2029,7 @@ $(document).ready(function() { init_codefold(0); });
bool canAdd(STAmount const &amt1, STAmount const &amt2)
Safely checks if two STAmount values can be added without overflow, underflow, or precision loss.
static std::uint64_t const tenTo17
-
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
+
std::uint64_t constexpr maxMPTokenAmount
The maximum amount of MPTokenIssuance.
STAmount amountFromQuality(std::uint64_t rate)
static std::string const & systemCurrencyCode()
bool set(T &target, std::string const &name, Section const §ion)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
diff --git a/STTx_8cpp_source.html b/STTx_8cpp_source.html
index 64c349f002..1c9a9562dc 100644
--- a/STTx_8cpp_source.html
+++ b/STTx_8cpp_source.html
@@ -1158,7 +1158,7 @@ $(document).ready(function() { init_codefold(0); });
Expected< void, std::string > multiSignHelper(STObject const &sigObject, std::optional< AccountID > txnAccountID, bool const fullyCanonical, std::function< Serializer(AccountID const &)> makeMsg, Rules const &rules)
@ txSign
inner transaction to sign
@ transactionID
transaction plus signature to give transaction ID
-
std::size_t constexpr maxBatchTxCount
The maximum number of transactions that can be in a batch.
+
std::size_t constexpr maxBatchTxCount
The maximum number of transactions that can be in a batch.
static Expected< void, std::string > singleSignHelper(STObject const &sigObject, Slice const &data, bool const fullyCanonical)
void LogicError(std::string const &how) noexcept
Called when faulty logic causes a broken invariant.
diff --git a/SetAccount_8cpp_source.html b/SetAccount_8cpp_source.html
index 397ac42b84..702bddb6f6 100644
--- a/SetAccount_8cpp_source.html
+++ b/SetAccount_8cpp_source.html
@@ -834,7 +834,7 @@ $(document).ready(function() { init_codefold(0); });
constexpr std::uint32_t tfRequireDestTag
constexpr std::uint32_t asfNoFreeze
AccountID calcAccountID(PublicKey const &pk)
-
std::size_t constexpr maxDomainLength
The maximum length of a domain.
+
std::size_t constexpr maxDomainLength
The maximum length of a domain.
constexpr std::uint32_t asfDisableMaster
bool dirIsEmpty(ReadView const &view, Keylet const &k)
Returns true if the directory is empty.
constexpr std::uint32_t asfDisallowIncomingTrustline
diff --git a/SetOracle_8cpp_source.html b/SetOracle_8cpp_source.html
index 3d4065b503..ba783cbad2 100644
--- a/SetOracle_8cpp_source.html
+++ b/SetOracle_8cpp_source.html
@@ -477,10 +477,10 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
static void setPriceDataInnerObjTemplate(STObject &obj)
bool isConsistent(Book const &book)
-
std::size_t constexpr maxPriceScale
The maximum price scaling factor.
-
std::size_t constexpr maxOracleURI
The maximum length of a URI inside an Oracle.
+
std::size_t constexpr maxPriceScale
The maximum price scaling factor.
+
std::size_t constexpr maxOracleURI
The maximum length of a URI inside an Oracle.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
-
std::size_t constexpr maxOracleProvider
The maximum length of a Provider inside an Oracle.
+
std::size_t constexpr maxOracleProvider
The maximum length of a Provider inside an Oracle.
std::function< void(SLE::ref)> describeOwnerDir(AccountID const &account)
static std::pair< Currency, Currency > tokenPairKey(STObject const &pair)
@@ -492,12 +492,12 @@ $(document).ready(function() { init_codefold(0); });
@ tecTOKEN_PAIR_NOT_FOUND
static constexpr std::chrono::seconds epoch_offset
Clock for measuring the network time.
-
std::size_t constexpr maxOracleSymbolClass
The maximum length of a SymbolClass inside an Oracle.
+
std::size_t constexpr maxOracleSymbolClass
The maximum length of a SymbolClass inside an Oracle.
-
std::size_t constexpr maxOracleDataSeries
The maximum size of a data series array inside an Oracle.
+
std::size_t constexpr maxOracleDataSeries
The maximum size of a data series array inside an Oracle.
TERSubset< CanCvtToTER > TER
-
std::size_t constexpr maxLastUpdateTimeDelta
The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.
+
std::size_t constexpr maxLastUpdateTimeDelta
The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.
TERSubset< CanCvtToNotTEC > NotTEC
diff --git a/SetSignerList_8cpp_source.html b/SetSignerList_8cpp_source.html
index c1463dcb8c..86f75d564b 100644
--- a/SetSignerList_8cpp_source.html
+++ b/SetSignerList_8cpp_source.html
@@ -576,7 +576,7 @@ $(document).ready(function() { init_codefold(0); });
Writeable view to a ledger, for applying a transaction.
-
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
+
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual void insert(std::shared_ptr< SLE > const &sle)=0
Insert a new state SLE.
std::optional< std::uint64_t > dirInsert(Keylet const &directory, uint256 const &key, std::function< void(std::shared_ptr< SLE > const &)> const &describe)
Insert an entry to a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
diff --git a/State_8cpp_source.html b/State_8cpp_source.html
index af5e3f3d70..852b14b621 100644
--- a/State_8cpp_source.html
+++ b/State_8cpp_source.html
@@ -228,7 +228,7 @@ $(document).ready(function() { init_codefold(0); });
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
LedgerIndex getCanDelete(soci::session &session)
getCanDelete Returns the ledger sequence which can be deleted.
-
std::uint32_t LedgerIndex
A ledger index.
+
std::uint32_t LedgerIndex
A ledger index.
SavedState getSavedState(soci::session &session)
getSavedState Returns the saved state.
void setSavedState(soci::session &session, SavedState const &state)
setSavedState Saves the given state.
void initStateDB(soci::session &session, BasicConfig const &config, std::string const &dbName)
initStateDB Opens a session with the State database.
diff --git a/TaggedCache__test_8cpp_source.html b/TaggedCache__test_8cpp_source.html
index 332cf5e4fb..dddd6be5c6 100644
--- a/TaggedCache__test_8cpp_source.html
+++ b/TaggedCache__test_8cpp_source.html
@@ -251,7 +251,7 @@ $(document).ready(function() { init_codefold(0); });
A namespace for easy access to logging severity values.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
-
std::uint32_t LedgerIndex
A ledger index.
+
std::uint32_t LedgerIndex
A ledger index.
Returns true if the entry was found and deleted and false otherwise.
Note This function will remove zero or more pages from the directory; the root page will not be deleted even if it is empty, unless keepRoot is not set and the directory is empty.
-Definition at line 191 of file ApplyView.cpp .
+Definition at line 207 of file ApplyView.cpp .
@@ -937,7 +937,7 @@ on this instance of the RawView.
Remove the specified directory, invoking the callback for every node.
-Definition at line 340 of file ApplyView.cpp .
+Definition at line 356 of file ApplyView.cpp .
@@ -967,7 +967,7 @@ on this instance of the RawView.
Returns true if the directory was found and was successfully deleted false otherwise.
Note The function should only be called with the root entry (i.e. with the first page) of a directory.
-Definition at line 125 of file ApplyView.cpp .
+Definition at line 141 of file ApplyView.cpp .
diff --git a/classripple_1_1ApplyViewImpl.html b/classripple_1_1ApplyViewImpl.html
index d330935c0b..1b46e05f58 100644
--- a/classripple_1_1ApplyViewImpl.html
+++ b/classripple_1_1ApplyViewImpl.html
@@ -1541,7 +1541,7 @@ on this instance of the RawView.
Add an entry to a directory using the specified insert strategy.
-Definition at line 28 of file ApplyView.cpp .
+Definition at line 31 of file ApplyView.cpp .
@@ -1860,7 +1860,7 @@ on this instance of the RawView.
Returns true if the entry was found and deleted and false otherwise.
Note This function will remove zero or more pages from the directory; the root page will not be deleted even if it is empty, unless keepRoot is not set and the directory is empty.
-Definition at line 191 of file ApplyView.cpp .
+Definition at line 207 of file ApplyView.cpp .
@@ -1950,7 +1950,7 @@ on this instance of the RawView.
Remove the specified directory, invoking the callback for every node.
-Definition at line 340 of file ApplyView.cpp .
+Definition at line 356 of file ApplyView.cpp .
@@ -1988,7 +1988,7 @@ on this instance of the RawView.
Returns true if the directory was found and was successfully deleted false otherwise.
Note The function should only be called with the root entry (i.e. with the first page) of a directory.
-Definition at line 125 of file ApplyView.cpp .
+Definition at line 141 of file ApplyView.cpp .
diff --git a/classripple_1_1PaymentSandbox.html b/classripple_1_1PaymentSandbox.html
index 906ca94f1d..cc6c864593 100644
--- a/classripple_1_1PaymentSandbox.html
+++ b/classripple_1_1PaymentSandbox.html
@@ -1807,7 +1807,7 @@ on this instance of the RawView.
Add an entry to a directory using the specified insert strategy.
-Definition at line 28 of file ApplyView.cpp .
+Definition at line 31 of file ApplyView.cpp .
@@ -2028,7 +2028,7 @@ on this instance of the RawView.
Returns true if the entry was found and deleted and false otherwise.
Note This function will remove zero or more pages from the directory; the root page will not be deleted even if it is empty, unless keepRoot is not set and the directory is empty.
-Definition at line 191 of file ApplyView.cpp .
+Definition at line 207 of file ApplyView.cpp .
@@ -2118,7 +2118,7 @@ on this instance of the RawView.
Remove the specified directory, invoking the callback for every node.
-Definition at line 340 of file ApplyView.cpp .
+Definition at line 356 of file ApplyView.cpp .
@@ -2156,7 +2156,7 @@ on this instance of the RawView.
Returns true if the directory was found and was successfully deleted false otherwise.
Note The function should only be called with the root entry (i.e. with the first page) of a directory.
-Definition at line 125 of file ApplyView.cpp .
+Definition at line 141 of file ApplyView.cpp .
diff --git a/classripple_1_1Sandbox.html b/classripple_1_1Sandbox.html
index c5bce6bab8..82607dfba9 100644
--- a/classripple_1_1Sandbox.html
+++ b/classripple_1_1Sandbox.html
@@ -1432,7 +1432,7 @@ on this instance of the RawView.
Add an entry to a directory using the specified insert strategy.
-Definition at line 28 of file ApplyView.cpp .
+Definition at line 31 of file ApplyView.cpp .
@@ -1751,7 +1751,7 @@ on this instance of the RawView.
Returns true if the entry was found and deleted and false otherwise.
Note This function will remove zero or more pages from the directory; the root page will not be deleted even if it is empty, unless keepRoot is not set and the directory is empty.
-Definition at line 191 of file ApplyView.cpp .
+Definition at line 207 of file ApplyView.cpp .
@@ -1841,7 +1841,7 @@ on this instance of the RawView.
Remove the specified directory, invoking the callback for every node.
-Definition at line 340 of file ApplyView.cpp .
+Definition at line 356 of file ApplyView.cpp .
@@ -1879,7 +1879,7 @@ on this instance of the RawView.
Returns true if the directory was found and was successfully deleted false otherwise.
Note The function should only be called with the root entry (i.e. with the first page) of a directory.
-Definition at line 125 of file ApplyView.cpp .
+Definition at line 141 of file ApplyView.cpp .
diff --git a/classripple_1_1detail_1_1ApplyViewBase.html b/classripple_1_1detail_1_1ApplyViewBase.html
index 697b4a1652..78a64116be 100644
--- a/classripple_1_1detail_1_1ApplyViewBase.html
+++ b/classripple_1_1detail_1_1ApplyViewBase.html
@@ -1358,7 +1358,7 @@ on this instance of the RawView.
Add an entry to a directory using the specified insert strategy.
-Definition at line 28 of file ApplyView.cpp .
+Definition at line 31 of file ApplyView.cpp .
@@ -1677,7 +1677,7 @@ on this instance of the RawView.
Returns true if the entry was found and deleted and false otherwise.
Note This function will remove zero or more pages from the directory; the root page will not be deleted even if it is empty, unless keepRoot is not set and the directory is empty.
-Definition at line 191 of file ApplyView.cpp .
+Definition at line 207 of file ApplyView.cpp .
@@ -1767,7 +1767,7 @@ on this instance of the RawView.
Remove the specified directory, invoking the callback for every node.
-Definition at line 340 of file ApplyView.cpp .
+Definition at line 356 of file ApplyView.cpp .
@@ -1805,7 +1805,7 @@ on this instance of the RawView.
Returns true if the directory was found and was successfully deleted false otherwise.
Note The function should only be called with the root entry (i.e. with the first page) of a directory.
-Definition at line 125 of file ApplyView.cpp .
+Definition at line 141 of file ApplyView.cpp .
diff --git a/dir_b6e1af3af959840d44bdaef0b719b3f9.html b/dir_b6e1af3af959840d44bdaef0b719b3f9.html
index 4bb6da9130..78add459ba 100644
--- a/dir_b6e1af3af959840d44bdaef0b719b3f9.html
+++ b/dir_b6e1af3af959840d44bdaef0b719b3f9.html
@@ -118,6 +118,8 @@ Files
dids.cpp
+ directory.cpp
+
domain.cpp
Env.cpp
diff --git a/dir_ffd09a46879067226d7ad9ce2abbf5ef.html b/dir_ffd09a46879067226d7ad9ce2abbf5ef.html
index bbea5d7c87..8c5a78c7b4 100644
--- a/dir_ffd09a46879067226d7ad9ce2abbf5ef.html
+++ b/dir_ffd09a46879067226d7ad9ce2abbf5ef.html
@@ -132,6 +132,8 @@ Files
did.h
+ directory.h
+
domain.h
Env.h
diff --git a/directory_8cpp_source.html b/directory_8cpp_source.html
new file mode 100644
index 0000000000..54213db67c
--- /dev/null
+++ b/directory_8cpp_source.html
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+rippled: directory.cpp Source File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ rippled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
20 #include <test/jtx/directory.h>
+
+
22 #include <xrpl/ledger/Sandbox.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
43 auto sleRoot = sb.
peek (directory);
+
+
+
+
+
+
+
+
51 auto const lastIndex = sleRoot->getFieldU64(sfIndexPrevious);
+
+
+
+
+
+
+
+
+
+
+
+
+
64 if (lastIndex >= newLastPage)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
78 auto indexes = slePage->getFieldV256(sfIndexes);
+
79 auto prevIndex = slePage->at(~sfIndexPrevious);
+
80 auto owner = slePage->at(~sfOwner);
+
+
+
+
+
+
86 sleNew->setFieldH256(sfRootIndex, directory.
key );
+
87 sleNew->setFieldV256(sfIndexes, indexes);
+
+
89 sleNew->setAccountID(sfOwner, *owner);
+
+
91 sleNew->setFieldU64(sfIndexPrevious, *prevIndex);
+
+
+
+
95 sleRoot->setFieldU64(sfIndexPrevious, newLastPage);
+
96 if (prevIndex.value_or(0) == 0)
+
97 sleRoot->setFieldU64(sfIndexNext, newLastPage);
+
+
+
+
+
+
+
+
+
106 slePrev->setFieldU64(sfIndexNext, newLastPage);
+
+
+
+
+
+
+
113 for (
auto const key : indexes)
+
+
115 if (!adjust(sb, key, newLastPage))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
133 if (sle && sle->isFieldPresent(sfOwnerNode))
+
+
135 sle->setFieldU64(sfOwnerNode, page);
+
+
+
+
+
+
+
+
+
+
+
+
A generic endpoint for log messages.
+
virtual OpenLedger & openLedger()=0
+
Writeable view to a ledger, for applying a transaction.
+
virtual void update(std::shared_ptr< SLE > const &sle)=0
Indicate changes to a peeked SLE.
+
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
+
+
bool modify(modify_type const &f)
Modify the open ledger.
+
Writable ledger view that accumulates state and tx changes.
+
Discardable, editable view to a ledger.
+
+
+
+
void erase(std::shared_ptr< SLE > const &sle) override
Remove a peeked SLE.
+
void update(std::shared_ptr< SLE > const &sle) override
Indicate changes to a peeked SLE.
+
void insert(std::shared_ptr< SLE > const &sle) override
Insert a new state SLE.
+
bool exists(Keylet const &k) const override
Determine if a state item exists.
+
std::shared_ptr< SLE > peek(Keylet const &k) override
Prepare to modify the SLE associated with key.
+
A transaction testing environment.
+
+
+
+
+
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
+
auto bumpLastPage(Env &env, std::uint64_t newLastPage, Keylet directory, std::function< bool(ApplyView &, uint256, std::uint64_t)> adjust) -> Expected< void, Error >
Move the position of the last page in the user's directory on open ledger to newLastPage.
+
+
+
+
+
+
+
bool adjustOwnerNode(ApplyView &view, uint256 key, std::uint64_t page)
Implementation of adjust for the most common ledger entry, i.e.
+
+
@ ltANY
A special type, matching any ledger entry type.
+
+
A pair of SHAMap key and LedgerEntryType.
+
+
+
+
+
+
diff --git a/directory_8h_source.html b/directory_8h_source.html
new file mode 100644
index 0000000000..cb53143f34
--- /dev/null
+++ b/directory_8h_source.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+rippled: directory.h Source File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ rippled
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
20 #ifndef RIPPLE_TEST_JTX_DIRECTORY_H_INCLUDED
+
21 #define RIPPLE_TEST_JTX_DIRECTORY_H_INCLUDED
+
+
23 #include <test/jtx/Env.h>
+
+
25 #include <xrpl/basics/Expected.h>
+
26 #include <xrpl/protocol/Feature.h>
+
27 #include <xrpl/protocol/Indexes.h>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
72 if (env.
enabled (fixDirectoryLimit))
+
+
+
+
+
+
+
+
+
+
+
+
Writeable view to a ledger, for applying a transaction.
+
+
+
A transaction testing environment.
+
bool enabled(uint256 feature) const
+
+
+
+
+
+
auto bumpLastPage(Env &env, std::uint64_t newLastPage, Keylet directory, std::function< bool(ApplyView &, uint256, std::uint64_t)> adjust) -> Expected< void, Error >
Move the position of the last page in the user's directory on open ledger to newLastPage.
+
+
+
+
+
+
+
+
auto maximumPageIndex(Env const &env) -> std::uint64_t
+
bool adjustOwnerNode(ApplyView &view, uint256 key, std::uint64_t page)
Implementation of adjust for the most common ledger entry, i.e.
+
+
std::uint64_t constexpr dirNodeMaxPages
The maximum number of pages allowed in a directory.
+
A pair of SHAMap key and LedgerEntryType.
+
+
+
+
+
diff --git a/functions_func_t.html b/functions_func_t.html
index 406d56a900..a3af3b8474 100644
--- a/functions_func_t.html
+++ b/functions_func_t.html
@@ -459,6 +459,7 @@ $(function() {
testDigestSigning() : ripple::SecretKey_test
testDirectCross() : ripple::test::OfferBaseUtil_test
testDirectories() : ripple::test::AccountDelete_test
+testDirectoryFull() : ripple::test::Directory_test
testDirectoryOrdering() : ripple::test::Directory_test
testDirectRipple() : ripple::TrustAndBalance_test
testDirectStep() : ripple::test::Flow_test , ripple::test::LPTokenTransfer_test , ripple::test::TheoreticalQuality_test
diff --git a/functions_s.html b/functions_s.html
index 0a3a5fa285..01a0f747de 100644
--- a/functions_s.html
+++ b/functions_s.html
@@ -366,7 +366,7 @@ $(function() {
Setup() : ripple::DatabaseCon::Setup , ripple::HashRouter::Setup
setup() : ripple::Ledger , ripple::OrderBookDB
Setup() : ripple::Overlay::Setup
-setup() : ripple::OverlayImpl , ripple::ServerHandler
+setup() : ripple::OverlayImpl , ripple::ServerHandler
Setup() : ripple::ServerHandler::Setup
setup() : ripple::test::TestOutputSuite
Setup() : ripple::TxQ::Setup
diff --git a/functions_t.html b/functions_t.html
index 79fbc82a8e..277c286fd1 100644
--- a/functions_t.html
+++ b/functions_t.html
@@ -491,6 +491,7 @@ $(function() {
testDigestSigning() : ripple::SecretKey_test
testDirectCross() : ripple::test::OfferBaseUtil_test
testDirectories() : ripple::test::AccountDelete_test
+testDirectoryFull() : ripple::test::Directory_test
testDirectoryOrdering() : ripple::test::Directory_test
testDirectRipple() : ripple::TrustAndBalance_test
testDirectStep() : ripple::test::Flow_test , ripple::test::LPTokenTransfer_test , ripple::test::TheoreticalQuality_test
@@ -703,7 +704,7 @@ $(function() {
testIssueMaps() : ripple::Issue_test
testIssueSet() : ripple::Issue_test
testIssueSets() : ripple::Issue_test
-testIterate() : ripple::TER_test
+testIterate() : ripple::TER_test
testIterator() : beast::aged_associative_container_test_base
testJobs() : ripple::PerfLog_test
testJson() : ripple::test::units_test
@@ -1354,7 +1355,7 @@ $(function() {
text : beast::field_t< CharT, Traits, Allocator >
tfee : ripple::test::jtx::CreateArg , ripple::test::jtx::DepositArg , ripple::test::jtx::TestAMMArg , ripple::test::jtx::VoteArg
this_suite() : beast::unit_test::suite
-thread : beast::unit_test::suite , beast::unit_test::thread , ripple::STLedgerEntry , ripple::test::jtx::Env::AppBundle
+thread : beast::unit_test::suite , beast::unit_test::thread , ripple::STLedgerEntry , ripple::test::jtx::Env::AppBundle
thread_ : ripple::GRPCServer , ripple::LedgerCleanerImp , ripple::LoadManager , ripple::perf::PerfLogImp , ripple::Resource::ManagerImp , ripple::SHAMapStoreImp , ripple::short_read_test , ripple::test::Server_test::TestThread , ripple::test::WSClientImpl , ripple::Workers::Worker
thread_specific_storage() : ripple::test::Coroutine_test
threadEntry() : ripple::NodeStore::Database
@@ -1365,7 +1366,7 @@ $(function() {
threads_ : BasicApp , beast::test::enable_yield_to
threadTx() : ripple::detail::ApplyStateTable
thresh_ : beast::Journal::Sink , ripple::Logs
-threshold() : beast::Journal::Sink , beast::NullJournalSink , beast::WrappedSink , ripple::AmendmentSet , ripple::Logs
+threshold() : beast::Journal::Sink , beast::NullJournalSink , beast::WrappedSink , ripple::AmendmentSet , ripple::Logs
threshold_ : ripple::AmendmentSet
throwsWhat : ripple::test::RPCCallTestData
tick() : ripple::ConsensusTimer
@@ -1414,7 +1415,7 @@ $(function() {
to_asio_endpoint() : beast::IPAddressConversion
to_endpoint() : beast::insight::detail::StatsDCollectorImp
to_nearest : ripple::Number
-to_string() : beast::IP::Endpoint , ripple::Clawback_test , ripple::NodeStore::Timing_test , ripple::path::detail::FlowDebugInfo , ripple::Resource::Charge , ripple::Resource::Consumer , ripple::Resource::Entry , ripple::SecretKey , ripple::SHAMapHash , ripple::test::Env_test , ripple::TrafficCount
+to_string() : beast::IP::Endpoint , ripple::Clawback_test , ripple::NodeStore::Timing_test , ripple::path::detail::FlowDebugInfo , ripple::Resource::Charge , ripple::Resource::Consumer , ripple::Resource::Entry , ripple::SecretKey , ripple::SHAMapHash , ripple::test::Env_test , ripple::TrafficCount
to_v4() : beast::IP::Endpoint
to_v6() : beast::IP::Endpoint
toBase58() : ripple::detail::AccountIdCache
@@ -1483,7 +1484,7 @@ $(function() {
tp_ : ripple::SharedWeakUnion< T > , ripple::TaggedPointer
trace() : beast::Journal , ripple::test::jtx::Env
trace_ : ripple::test::jtx::Env
-TrackedString() : ripple::test::ClosureCounter_test::TrackedString
+TrackedString() : ripple::test::ClosureCounter_test::TrackedString
Tracker() : ripple::test::csf::LedgerCollector::Tracker , ripple::test::csf::TxCollector::Tracker
tracker_ : ripple::RCLCensorshipDetector< TxID, Sequence >
Tracking : ripple::PeerImp
@@ -1497,7 +1498,7 @@ $(function() {
TrafficCount() : ripple::TrafficCount
trafficGauges : ripple::OverlayImpl::Stats
TrafficGauges() : ripple::OverlayImpl::TrafficGauges
-TrafficStats() : ripple::TrafficCount::TrafficStats
+TrafficStats() : ripple::TrafficCount::TrafficStats
traits_type : beast::basic_logstream< CharT, Traits >
transaction : ripple::NetworkOPsImp::TransactionStatus , ripple::TrafficCount
Transaction() : ripple::Transaction
@@ -1509,7 +1510,7 @@ $(function() {
transactionDbHasSpace() : ripple::RelationalDatabase , ripple::SQLiteDatabaseImp
transactionFromSQL() : ripple::Transaction
TransactionMaster() : ripple::TransactionMaster
-transactionPreProcessResult() : ripple::RPC::detail::transactionPreProcessResult
+transactionPreProcessResult() : ripple::RPC::detail::transactionPreProcessResult
transactions : ripple::metrics::TxMetrics , ripple::RelationalDatabase::AccountTxResult , ripple::TxQ::TxQAccount
transactions_ : ripple::AcceptedLedger
TransactionStateSF() : ripple::TransactionStateSF
@@ -1552,7 +1553,7 @@ $(function() {
trustedSigningKeys_ : ripple::ValidatorList
trustedValidations() : ripple::AmendmentSet
trustedValidations_ : ripple::AmendmentSet
-TrustedVotes() : ripple::TrustedVotes
+TrustedVotes() : ripple::TrustedVotes
trustGraph : ripple::test::csf::Peer , ripple::test::csf::Sim
TrustGraph() : ripple::test::csf::TrustGraph< Peer >
TrustLineBase() : ripple::PathFindTrustLine , ripple::RPCTrustLine , ripple::TrustLineBase
diff --git a/jtx_8h_source.html b/jtx_8h_source.html
index dedf7da802..eefe647d07 100644
--- a/jtx_8h_source.html
+++ b/jtx_8h_source.html
@@ -122,46 +122,47 @@ $(document).ready(function() { init_codefold(0); });
39 #include <test/jtx/delivermin.h>
40 #include <test/jtx/deposit.h>
41 #include <test/jtx/did.h>
- 42 #include <test/jtx/domain.h>
- 43 #include <test/jtx/escrow.h>
- 44 #include <test/jtx/fee.h>
- 45 #include <test/jtx/flags.h>
- 46 #include <test/jtx/invoice_id.h>
- 47 #include <test/jtx/jtx_json.h>
- 48 #include <test/jtx/last_ledger_sequence.h>
- 49 #include <test/jtx/ledgerStateFix.h>
- 50 #include <test/jtx/memo.h>
- 51 #include <test/jtx/mpt.h>
- 52 #include <test/jtx/multisign.h>
- 53 #include <test/jtx/noop.h>
- 54 #include <test/jtx/offer.h>
- 55 #include <test/jtx/owners.h>
- 56 #include <test/jtx/paths.h>
- 57 #include <test/jtx/pay.h>
- 58 #include <test/jtx/permissioned_dex.h>
- 59 #include <test/jtx/permissioned_domains.h>
- 60 #include <test/jtx/prop.h>
- 61 #include <test/jtx/quality.h>
- 62 #include <test/jtx/rate.h>
- 63 #include <test/jtx/regkey.h>
- 64 #include <test/jtx/require.h>
- 65 #include <test/jtx/requires.h>
- 66 #include <test/jtx/rpc.h>
- 67 #include <test/jtx/sendmax.h>
- 68 #include <test/jtx/seq.h>
- 69 #include <test/jtx/sig.h>
- 70 #include <test/jtx/tag.h>
- 71 #include <test/jtx/tags.h>
- 72 #include <test/jtx/ter.h>
- 73 #include <test/jtx/ticket.h>
- 74 #include <test/jtx/token.h>
- 75 #include <test/jtx/trust.h>
- 76 #include <test/jtx/txflags.h>
- 77 #include <test/jtx/utility.h>
-
- 79 #include <xrpl/json/to_string.h>
-
-
+ 42 #include <test/jtx/directory.h>
+ 43 #include <test/jtx/domain.h>
+ 44 #include <test/jtx/escrow.h>
+ 45 #include <test/jtx/fee.h>
+ 46 #include <test/jtx/flags.h>
+ 47 #include <test/jtx/invoice_id.h>
+ 48 #include <test/jtx/jtx_json.h>
+ 49 #include <test/jtx/last_ledger_sequence.h>
+ 50 #include <test/jtx/ledgerStateFix.h>
+ 51 #include <test/jtx/memo.h>
+ 52 #include <test/jtx/mpt.h>
+ 53 #include <test/jtx/multisign.h>
+ 54 #include <test/jtx/noop.h>
+ 55 #include <test/jtx/offer.h>
+ 56 #include <test/jtx/owners.h>
+ 57 #include <test/jtx/paths.h>
+ 58 #include <test/jtx/pay.h>
+ 59 #include <test/jtx/permissioned_dex.h>
+ 60 #include <test/jtx/permissioned_domains.h>
+ 61 #include <test/jtx/prop.h>
+ 62 #include <test/jtx/quality.h>
+ 63 #include <test/jtx/rate.h>
+ 64 #include <test/jtx/regkey.h>
+ 65 #include <test/jtx/require.h>
+ 66 #include <test/jtx/requires.h>
+ 67 #include <test/jtx/rpc.h>
+ 68 #include <test/jtx/sendmax.h>
+ 69 #include <test/jtx/seq.h>
+ 70 #include <test/jtx/sig.h>
+ 71 #include <test/jtx/tag.h>
+ 72 #include <test/jtx/tags.h>
+ 73 #include <test/jtx/ter.h>
+ 74 #include <test/jtx/ticket.h>
+ 75 #include <test/jtx/token.h>
+ 76 #include <test/jtx/trust.h>
+ 77 #include <test/jtx/txflags.h>
+ 78 #include <test/jtx/utility.h>
+
+ 80 #include <xrpl/json/to_string.h>
+
+