Merge remote-tracking branch 'xrplf/develop' into sponsor

This commit is contained in:
tequ
2026-04-08 11:47:16 +09:00
741 changed files with 7547 additions and 6324 deletions

View File

@@ -1,9 +1,9 @@
#include <test/jtx.h>
#include <xrpl/basics/random.h>
#include <xrpl/ledger/helpers/NFTokenHelpers.h>
#include <xrpl/protocol/Feature.h>
#include <xrpl/protocol/jss.h>
#include <xrpl/tx/transactors/nft/NFTokenUtils.h>
#include <initializer_list>
@@ -599,7 +599,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
env.close();
BEAST_EXPECT(ownerCount(env, alice) == 1);
uint256 nftNoXferID = token::getNextID(env, alice, 0);
uint256 const nftNoXferID = token::getNextID(env, alice, 0);
env(token::mint(alice, 0));
env.close();
BEAST_EXPECT(ownerCount(env, alice) == 1);
@@ -868,7 +868,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
// List of tokens to delete is too long.
{
std::vector<uint256> offers(maxTokenOfferCancelCount + 1, buyerOfferIndex);
std::vector<uint256> const offers(maxTokenOfferCancelCount + 1, buyerOfferIndex);
env(token::cancelOffer(buyer, offers), ter(temMALFORMED));
env.close();
@@ -955,7 +955,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
env.close();
BEAST_EXPECT(ownerCount(env, alice) == aliceCount);
uint256 nftNoXferID = token::getNextID(env, alice, 0);
uint256 const nftNoXferID = token::getNextID(env, alice, 0);
env(token::mint(alice, 0));
env.close();
BEAST_EXPECT(ownerCount(env, alice) == aliceCount);
@@ -1534,7 +1534,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
// An nft without flagCreateTrustLines but with a non-zero transfer
// fee will not allow creating offers that use IOUs for payment.
for (std::uint32_t xferFee : {0, 1})
for (std::uint32_t const xferFee : {0, 1})
{
uint256 const nftNoAutoTrustID{
token::getNextID(env, alice, 0u, tfTransferable, xferFee)};
@@ -1571,7 +1571,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
// An nft with flagCreateTrustLines but with a non-zero transfer
// fee allows transfers using IOUs for payment.
{
std::uint16_t transferFee = 10000; // 10%
std::uint16_t const transferFee = 10000; // 10%
uint256 const nftAutoTrustID{
token::getNextID(env, alice, 0u, tfTransferable | tfTrustLine, transferFee)};
@@ -1625,7 +1625,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
// Now that alice has trust lines preestablished, an nft without
// flagCreateTrustLines will work for preestablished trust lines.
{
std::uint16_t transferFee = 5000; // 5%
std::uint16_t const transferFee = 5000; // 5%
uint256 const nftNoAutoTrustID{
token::getNextID(env, alice, 0u, tfTransferable, transferFee)};
env(token::mint(alice, 0u), token::xferFee(transferFee), txflags(tfTransferable));
@@ -2280,7 +2280,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
env.close();
// Here is the smallest expressible gwXAU amount.
STAmount tinyXAU(gwXAU.issue(), STAmount::cMinValue, STAmount::cMinOffset);
STAmount const tinyXAU(gwXAU.issue(), STAmount::cMinValue, STAmount::cMinOffset);
// minter buys the nft for tinyXAU. Since the transfer involves
// alice there should be no transfer fee.
@@ -3721,7 +3721,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
int line) {
for (Account const& acct : accounts)
{
if (std::uint32_t ownerCount = test::jtx::ownerCount(env, acct);
if (std::uint32_t const ownerCount = test::jtx::ownerCount(env, acct);
ownerCount != 1)
{
std::stringstream ss;
@@ -6615,7 +6615,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
env.close();
// issuer creates two NFTs: one with and one without AutoTrustLine.
std::uint16_t xferFee = 5000; // 5%
std::uint16_t const xferFee = 5000; // 5%
uint256 const nftAutoTrustID{
token::getNextID(env, issuer, 0u, tfTransferable | tfTrustLine, xferFee)};
env(token::mint(issuer, 0u),
@@ -6771,7 +6771,7 @@ class NFTokenBaseUtil_test : public beast::unit_test::suite
env.close();
// issuer creates two NFTs: one with and one without AutoTrustLine.
std::uint16_t xferFee = 5000; // 5%
std::uint16_t const xferFee = 5000; // 5%
uint256 const nftAutoTrustID{
token::getNextID(env, issuer, 0u, tfTransferable | tfTrustLine, xferFee)};
env(token::mint(issuer, 0u),