mirror of
https://github.com/XRPLF/clio.git
synced 2026-10-04 02:48:04 +00:00
chore: Use libxrpl 3.3.0-rc1 (#3144)
This commit is contained in:
21
conan.lock
21
conan.lock
@@ -3,7 +3,7 @@
|
||||
"requires": [
|
||||
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1782392402.122708",
|
||||
"xxhash/0.8.3#681d36a0a6111fc56e5e45ea182c19cc%1782392402.420688",
|
||||
"xrpl/3.2.0#c3c124909c6461012758a4fab7c90cd5%1782492037.328253",
|
||||
"xrpl/3.3.0-rc1#526e843efce69a95339435869d2ec42c%1784212398.613288",
|
||||
"sqlite3/3.53.0#324ada52333108388a9a6108bfa96734%1782392403.185447",
|
||||
"spdlog/1.17.0#bcbaaf7147bda6ad24ffbd1ac3d7142c%1782736610.443882",
|
||||
"soci/4.0.3#e726491a03468795453f7c83fc924a96%1782392402.679521",
|
||||
@@ -13,8 +13,9 @@
|
||||
"re2/20251105#8579cfd0bda4daf0683f9e3898f964b4%1782392402.431897",
|
||||
"rapidjson/cci.20220822#1b9d8c2256876a154172dc5cfbe447c6%1782736605.214886",
|
||||
"protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933",
|
||||
"openssl/3.6.3#1163d4ddc603907084d08a6a0c6e580f%1782307150.583886",
|
||||
"openssl/3.6.3#f806de8933e3bf6f01016c6a888cee2e%1783945160.863288",
|
||||
"nudb/2.0.9#11149c73f8f2baff9a0198fe25971fc7%1782392402.297166",
|
||||
"mpt-crypto/0.4.0-rc4#ffdba12f2332357f0d8b0ae944cfff52%1784138702.932355",
|
||||
"minizip/1.2.13#64dfec2ee447ab6c0c7eab967815a762%1782736605.272739",
|
||||
"lz4/1.10.0#982d9b673900f665a1da109e09c17cab%1782392402.164188",
|
||||
"libuv/1.46.0#e1a592bf7c0f37802889ca2c795fb26c%1782736605.776567",
|
||||
@@ -23,7 +24,7 @@
|
||||
"libarchive/3.8.7#c446109bd1f1d8ba7936c94189bc50e6%1782392403.066892",
|
||||
"http_parser/2.9.4#98d91690d6fd021e9e624218a85d9d97%1782736605.237778",
|
||||
"gtest/1.17.0#5224b3b3ff3b4ce1133cbdd27d53ee7d%1782392402.791979",
|
||||
"grpc/1.78.1#b1a9e74b145cc471bed4dc64dc6eb2c1%1782736970.619035",
|
||||
"grpc/1.81.1#f729f6d75992d20f9c72828e9142d62f%1783945160.094135",
|
||||
"fmt/12.1.0#50abab23274d56bb8f42c94b3b9a40c7%1782736606.427131",
|
||||
"ed25519/2015.03#ae761bdc52730a843f0809bdf6c1b1f6%1782307148.15562",
|
||||
"date/3.0.4#862e11e80030356b53c2c38599ceb32b%1782392402.538492",
|
||||
@@ -32,26 +33,27 @@
|
||||
"bzip2/1.0.8#c470882369c2d95c5c77e970c0c7e321%1782392402.296732",
|
||||
"boost/1.91.0#ea540ca2133d831b560036aa24dece3c%1782392419.475605",
|
||||
"benchmark/1.9.5#b885dc73ad67b40a55d45684d1c88ad1%1782736613.864841",
|
||||
"abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1782307147.395833"
|
||||
"abseil/20250127.0#9ef01c1451a8340f9022e46238c0fbb6%1783945159.651047"
|
||||
],
|
||||
"build_requires": [
|
||||
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb%1782392402.122708",
|
||||
"protobuf/6.33.5#ff253ead763bd8d9904a52979cd21e81%1782392410.233933",
|
||||
"cmake/4.3.3#840cf00ea09777e05c2050a50a82c722%1782392418.696091",
|
||||
"b2/5.4.2#ffd6084a119587e70f11cd45d1a386e2%1782392402.624226",
|
||||
"abseil/20250127.0#bb0baf1f362bc4a725a24eddd419b8f7%1782307147.395833"
|
||||
"abseil/20250127.0#9ef01c1451a8340f9022e46238c0fbb6%1783945159.651047"
|
||||
],
|
||||
"python_requires": [],
|
||||
"overrides": {
|
||||
"openssl/3.6.3#f806de8933e3bf6f01016c6a888cee2e": [
|
||||
null,
|
||||
"openssl/3.6.3#f806de8933e3bf6f01016c6a888cee2e"
|
||||
],
|
||||
"openssl/[>=1.1 <4]": [
|
||||
"openssl/3.6.3"
|
||||
],
|
||||
"zlib/[>=1.2.11 <2]": [
|
||||
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb"
|
||||
],
|
||||
"openssl/3.6.2": [
|
||||
"openssl/3.6.3#1163d4ddc603907084d08a6a0c6e580f"
|
||||
],
|
||||
"zlib/1.3.2": [
|
||||
null,
|
||||
"zlib/1.3.2#1cb806da49011867778ffb6ac7190fcb"
|
||||
@@ -74,6 +76,9 @@
|
||||
"boost/1.83.0": [
|
||||
"boost/1.91.0"
|
||||
],
|
||||
"openssl/[>=3.5 <4]": [
|
||||
"openssl/3.6.3#f806de8933e3bf6f01016c6a888cee2e"
|
||||
],
|
||||
"lz4/[>=1.9.4 <2]": [
|
||||
"lz4/1.10.0#982d9b673900f665a1da109e09c17cab"
|
||||
]
|
||||
|
||||
@@ -17,7 +17,7 @@ class ClioConan(ConanFile):
|
||||
"fmt/12.1.0",
|
||||
"libbacktrace/cci.20210118",
|
||||
"spdlog/1.17.0",
|
||||
"xrpl/3.2.0",
|
||||
"xrpl/3.3.0-rc1",
|
||||
]
|
||||
|
||||
default_options = {
|
||||
@@ -46,7 +46,7 @@ class ClioConan(ConanFile):
|
||||
# (only boost/date/xxhash are required with transitive_headers=True).
|
||||
# So they must be direct requirements of clio to get their include dirs;
|
||||
# the version pins match xrpl's, so this does not change any package_id.
|
||||
self.requires("grpc/1.78.1")
|
||||
self.requires("grpc/1.81.1")
|
||||
self.requires("openssl/3.6.3", force=True)
|
||||
# Pin the remaining transitive deps to the exact versions xrpl uses.
|
||||
# override=True only sets the version when the package appears
|
||||
|
||||
@@ -139,6 +139,12 @@ struct Amendments {
|
||||
REGISTER(fixBatchInnerSigs);
|
||||
REGISTER(fixCleanup3_1_3);
|
||||
REGISTER(fixCleanup3_2_0);
|
||||
// These amendments are added because of libxrpl 3.3.0, but they are not yet supported in Clio.
|
||||
REGISTER(ConfidentialTransfer);
|
||||
REGISTER(LendingProtocolV1_1);
|
||||
REGISTER(BatchV1_1);
|
||||
REGISTER(Sponsor);
|
||||
REGISTER(fixCleanup3_3_0);
|
||||
|
||||
// Obsolete but supported by libxrpl
|
||||
REGISTER(CryptoConditionsSuite);
|
||||
|
||||
@@ -353,7 +353,7 @@ BackendInterface::fetchFees(std::uint32_t const seq, boost::asio::yield_context
|
||||
{
|
||||
xrpl::Fees fees;
|
||||
|
||||
auto key = xrpl::keylet::fees().key;
|
||||
auto key = xrpl::keylet::feeSettings().key;
|
||||
auto bytes = fetchLedgerObject(key, seq, yield);
|
||||
|
||||
if (!bytes) {
|
||||
|
||||
@@ -594,8 +594,8 @@ traverseNFTObjects(
|
||||
std::function<void(xrpl::SLE)> atOwnedNode
|
||||
)
|
||||
{
|
||||
auto const firstNFTPage = xrpl::keylet::nftpageMin(accountID);
|
||||
auto const lastNFTPage = xrpl::keylet::nftpageMax(accountID);
|
||||
auto const firstNFTPage = xrpl::keylet::nftokenPageMin(accountID);
|
||||
auto const lastNFTPage = xrpl::keylet::nftokenPageMax(accountID);
|
||||
|
||||
// check if nextPage is valid
|
||||
if (nextPage != beast::kZero and firstNFTPage.key != (nextPage & ~xrpl::nft::kPageMask))
|
||||
@@ -966,7 +966,7 @@ isFrozen(
|
||||
))
|
||||
return true;
|
||||
|
||||
auto const trustLineKeylet = xrpl::keylet::line(account, issuer, currency);
|
||||
auto const trustLineKeylet = xrpl::keylet::trustLine(account, issuer, currency);
|
||||
return issuer != account &&
|
||||
fetchAndCheckAnyFlagsExists(
|
||||
backend,
|
||||
@@ -993,7 +993,7 @@ isDeepFrozen(
|
||||
if (issuer == account)
|
||||
return false;
|
||||
|
||||
auto const trustLineKeylet = xrpl::keylet::line(account, issuer, currency);
|
||||
auto const trustLineKeylet = xrpl::keylet::trustLine(account, issuer, currency);
|
||||
|
||||
return fetchAndCheckAnyFlagsExists(
|
||||
backend, sequence, trustLineKeylet, {xrpl::lsfHighDeepFreeze, xrpl::lsfLowDeepFreeze}, yield
|
||||
@@ -1033,13 +1033,20 @@ xrpLiquid(
|
||||
|
||||
std::uint32_t const ownerCount = sle.getFieldU32(xrpl::sfOwnerCount);
|
||||
|
||||
// A sponsored account pays no base reserve of its own, and an account pays one extra base
|
||||
// reserve for every account it sponsors. Before the Sponsor amendment activates neither field
|
||||
// is ever set, so this evaluates to 1 and matches the previous behaviour.
|
||||
std::uint32_t const accountCount = (sle.isFieldPresent(xrpl::sfSponsor) ? 0 : 1) +
|
||||
sle.getFieldU32(xrpl::sfSponsoringAccountCount);
|
||||
|
||||
auto balance = sle.getFieldAmount(xrpl::sfBalance);
|
||||
|
||||
xrpl::STAmount const amount = [&]() {
|
||||
// AMM doesn't require the reserves
|
||||
if ((sle.getFlags() & xrpl::lsfAMMNode) != 0u)
|
||||
return balance;
|
||||
auto const reserve = backend.fetchFees(sequence, yield)->accountReserve(ownerCount);
|
||||
auto const reserve =
|
||||
backend.fetchFees(sequence, yield)->accountReserve(ownerCount, accountCount);
|
||||
xrpl::STAmount amount = balance - reserve;
|
||||
if (balance < reserve)
|
||||
amount.clear();
|
||||
@@ -1091,7 +1098,7 @@ ammAccountHolds(
|
||||
if (xrpl::isXRP(currency))
|
||||
return {xrpLiquid(backend, sequence, account, yield)};
|
||||
|
||||
auto const key = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const key = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
auto const blob = backend.fetchLedgerObject(key, sequence, yield);
|
||||
|
||||
if (!blob) {
|
||||
@@ -1136,7 +1143,7 @@ accountHolds(
|
||||
if (xrpl::isXRP(currency))
|
||||
return {xrpLiquid(backend, sequence, account, yield)};
|
||||
|
||||
auto const key = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const key = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
auto const blob = backend.fetchLedgerObject(key, sequence, yield);
|
||||
|
||||
if (!blob) {
|
||||
|
||||
@@ -300,7 +300,7 @@ CustomValidator CustomValidators::credentialTypeValidator =
|
||||
}};
|
||||
}
|
||||
|
||||
auto const& credTypeHex = xrpl::strViewUnHex(value.as_string());
|
||||
auto const& credTypeHex = xrpl::strUnHex(value.as_string());
|
||||
if (!credTypeHex.has_value()) {
|
||||
return Error{Status{
|
||||
ClioError::RpcMalformedAuthorizedCredentials, std::string(key) + " NotHexString"
|
||||
|
||||
@@ -100,7 +100,7 @@ AccountInfoHandler::process(AccountInfoHandler::Input const& input, Context cons
|
||||
// We put the SignerList in an array because of an anticipated
|
||||
// future when we support multiple signer lists on one account.
|
||||
auto const signersKey =
|
||||
xrpl::keylet::signers(*accountID); // NOLINT(bugprone-unchecked-optional-access)
|
||||
xrpl::keylet::signerList(*accountID); // NOLINT(bugprone-unchecked-optional-access)
|
||||
|
||||
// This code will need to be revisited if in the future we
|
||||
// support multiple SignerLists on one account.
|
||||
|
||||
@@ -63,12 +63,12 @@ AccountMPTokenIssuancesHandler::addMPTokenIssuance(
|
||||
field = true;
|
||||
};
|
||||
|
||||
setMutableFlag(issuance.mptCanMutateCanLock, xrpl::lsmfMPTCanMutateCanLock);
|
||||
setMutableFlag(issuance.mptCanMutateRequireAuth, xrpl::lsmfMPTCanMutateRequireAuth);
|
||||
setMutableFlag(issuance.mptCanMutateCanEscrow, xrpl::lsmfMPTCanMutateCanEscrow);
|
||||
setMutableFlag(issuance.mptCanMutateCanTrade, xrpl::lsmfMPTCanMutateCanTrade);
|
||||
setMutableFlag(issuance.mptCanMutateCanTransfer, xrpl::lsmfMPTCanMutateCanTransfer);
|
||||
setMutableFlag(issuance.mptCanMutateCanClawback, xrpl::lsmfMPTCanMutateCanClawback);
|
||||
setMutableFlag(issuance.mptCanMutateCanLock, xrpl::lsmfMPTCanEnableCanLock);
|
||||
setMutableFlag(issuance.mptCanMutateRequireAuth, xrpl::lsmfMPTCanEnableRequireAuth);
|
||||
setMutableFlag(issuance.mptCanMutateCanEscrow, xrpl::lsmfMPTCanEnableCanEscrow);
|
||||
setMutableFlag(issuance.mptCanMutateCanTrade, xrpl::lsmfMPTCanEnableCanTrade);
|
||||
setMutableFlag(issuance.mptCanMutateCanTransfer, xrpl::lsmfMPTCanEnableCanTransfer);
|
||||
setMutableFlag(issuance.mptCanMutateCanClawback, xrpl::lsmfMPTCanEnableCanClawback);
|
||||
setMutableFlag(issuance.mptCanMutateMetadata, xrpl::lsmfMPTCanMutateMetadata);
|
||||
setMutableFlag(issuance.mptCanMutateTransferFee, xrpl::lsmfMPTCanMutateTransferFee);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ AccountNFTsHandler::process(AccountNFTsHandler::Input const& input, Context cons
|
||||
// if a marker was passed, start at the page specified in marker. Else, start at the max page
|
||||
auto const pageKey = input.marker ? xrpl::uint256{input.marker->c_str()}
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
: xrpl::keylet::nftpageMax(*accountID).key;
|
||||
: xrpl::keylet::nftokenPageMax(*accountID).key;
|
||||
auto const blob = sharedPtrBackend_->fetchLedgerObject(pageKey, lgrInfo.seq, ctx.yield);
|
||||
|
||||
if (!blob) {
|
||||
@@ -104,7 +104,7 @@ AccountNFTsHandler::process(AccountNFTsHandler::Input const& input, Context cons
|
||||
obj[SFS(sfFlags)] = xrpl::nft::getFlags(nftokenID);
|
||||
obj[SFS(sfIssuer)] = to_string(xrpl::nft::getIssuer(nftokenID));
|
||||
obj[SFS(sfNFTokenTaxon)] = xrpl::nft::toUInt32(xrpl::nft::getTaxon(nftokenID));
|
||||
obj[JS(nft_serial)] = xrpl::nft::getSerial(nftokenID);
|
||||
obj[JS(nft_serial)] = xrpl::nft::getSequence(nftokenID);
|
||||
|
||||
if (std::uint16_t const xferFee = {xrpl::nft::getTransferFee(nftokenID)})
|
||||
obj[SFS(sfTransferFee)] = xferFee;
|
||||
|
||||
@@ -87,7 +87,7 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input const& input, Context cons
|
||||
);
|
||||
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
key = xrpl::keylet::line(*id1, *id2, currency).key;
|
||||
key = xrpl::keylet::trustLine(*id1, *id2, currency).key;
|
||||
} else if (input.escrow) {
|
||||
auto const id = util::parseBase58Wrapper<xrpl::AccountID>(
|
||||
boost::json::value_to<std::string>(input.escrow->at(JS(owner)))
|
||||
@@ -186,7 +186,7 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input const& input, Context cons
|
||||
key = *input.credential;
|
||||
} else if (input.mptIssuance) {
|
||||
auto const mptIssuanceID = xrpl::uint192{std::string_view(*(input.mptIssuance))};
|
||||
key = xrpl::keylet::mptIssuance(mptIssuanceID).key;
|
||||
key = xrpl::keylet::mptokenIssuance(mptIssuanceID).key;
|
||||
} else if (input.mptoken) {
|
||||
auto const holder = xrpl::parseBase58<xrpl::AccountID>(
|
||||
boost::json::value_to<std::string>(input.mptoken->at(JS(account)))
|
||||
@@ -216,7 +216,7 @@ LedgerEntryHandler::process(LedgerEntryHandler::Input const& input, Context cons
|
||||
);
|
||||
auto const seq = util::integralValueAs<uint32_t>(input.loanBroker->at(JS(seq)));
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
key = xrpl::keylet::loanbroker(*account, seq).key;
|
||||
key = xrpl::keylet::loanBroker(*account, seq).key;
|
||||
} else if (input.loan) {
|
||||
auto const id = xrpl::uint256{
|
||||
boost::json::value_to<std::string>(input.loan->at(JS(loan_broker_id))).data()
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <xrpl/protocol/Issue.h>
|
||||
#include <xrpl/protocol/LedgerFormats.h>
|
||||
#include <xrpl/protocol/SField.h>
|
||||
#include <xrpl/protocol/STXChainBridge.h>
|
||||
#include <xrpl/protocol/jss.h>
|
||||
#include <xrpl/protocol/tokens.h>
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ MPTHoldersHandler::process(MPTHoldersHandler::Input const& input, Context const&
|
||||
auto const mptID = xrpl::uint192{input.mptID.c_str()};
|
||||
|
||||
auto const issuanceLedgerObject = sharedPtrBackend_->fetchLedgerObject(
|
||||
xrpl::keylet::mptIssuance(mptID).key, lgrInfo.seq, ctx.yield
|
||||
xrpl::keylet::mptokenIssuance(mptID).key, lgrInfo.seq, ctx.yield
|
||||
);
|
||||
if (!issuanceLedgerObject)
|
||||
return Error{Status{RippledError::RpcObjectNotFound, "objectNotFound"}};
|
||||
@@ -68,7 +68,7 @@ MPTHoldersHandler::process(MPTHoldersHandler::Input const& input, Context const&
|
||||
boost::json::array const mpts;
|
||||
for (auto const& mpt : dbResponse.mptokens) {
|
||||
xrpl::STLedgerEntry const sle{
|
||||
xrpl::SerialIter{mpt.data(), mpt.size()}, keylet::mptIssuance(mptID).key
|
||||
xrpl::SerialIter{mpt.data(), mpt.size()}, keylet::mptokenIssuance(mptID).key
|
||||
};
|
||||
boost::json::object mptJson;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ NFTInfoHandler::process(NFTInfoHandler::Input const& input, Context const& ctx)
|
||||
output.transferFee = nft::getTransferFee(nft.tokenID);
|
||||
output.issuer = toBase58(nft::getIssuer(nft.tokenID));
|
||||
output.taxon = nft::toUInt32(nft::getTaxon(nft.tokenID));
|
||||
output.serial = nft::getSerial(nft.tokenID);
|
||||
output.serial = nft::getSequence(nft.tokenID);
|
||||
output.uri = strHex(nft.uri);
|
||||
|
||||
return output;
|
||||
|
||||
@@ -103,7 +103,7 @@ NFTOffersHandlerBase::iterateOfferDirectory(
|
||||
// We have a start point. Use limit - 1 from the result and use the very last one for the
|
||||
// resume.
|
||||
auto const sle = [this, &cursor, &lgrInfo, yield]() -> std::shared_ptr<SLE const> {
|
||||
auto const key = keylet::nftoffer(cursor).key;
|
||||
auto const key = keylet::nftokenOffer(cursor).key;
|
||||
|
||||
if (auto const blob = sharedPtrBackend_->fetchLedgerObject(key, lgrInfo.seq, yield);
|
||||
blob)
|
||||
|
||||
@@ -92,7 +92,7 @@ NFTsByIssuerHandler::process(NFTsByIssuerHandler::Input const& input, Context co
|
||||
nftJson["transfer_fee"] = nft::getTransferFee(nft.tokenID);
|
||||
nftJson[JS(issuer)] = toBase58(nft::getIssuer(nft.tokenID));
|
||||
nftJson[JS(nft_taxon)] = nft::toUInt32(nft::getTaxon(nft.tokenID));
|
||||
nftJson[JS(nft_serial)] = nft::getSerial(nft.tokenID);
|
||||
nftJson[JS(nft_serial)] = nft::getSequence(nft.tokenID);
|
||||
|
||||
output.nfts.push_back(nftJson);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ VaultInfoHandler::process(VaultInfoHandler::Input const& input, Context const& c
|
||||
xrpl::SerialIter{vaultLedgerObject->data(), vaultLedgerObject->size()}, vaultKeylet->key
|
||||
};
|
||||
|
||||
auto const issuanceKeylet = xrpl::keylet::mptIssuance(vaultSle[xrpl::sfShareMPTID]).key;
|
||||
auto const issuanceKeylet = xrpl::keylet::mptokenIssuance(vaultSle[xrpl::sfShareMPTID]).key;
|
||||
auto const issuanceObject =
|
||||
sharedPtrBackend_->fetchLedgerObject(issuanceKeylet, lgrInfo.seq, ctx.yield);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ TEST_F(BackendInterfaceTest, FetchFeesSuccessPath)
|
||||
using namespace xrpl;
|
||||
|
||||
// New fee setting (after XRPFees amendment)
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(keylet::fees().key, kMaxSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(keylet::feeSettings().key, kMaxSeq, _))
|
||||
.WillRepeatedly(Return(createFeeSettingBlob(XRPAmount(1), XRPAmount(2), XRPAmount(3), 0)));
|
||||
|
||||
runSpawn([this](auto yield) {
|
||||
@@ -56,7 +56,7 @@ TEST_F(BackendInterfaceTest, FetchFeesLegacySuccessPath)
|
||||
using namespace xrpl;
|
||||
|
||||
// Legacy fee setting (before XRPFees amendment)
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(keylet::fees().key, kMaxSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(keylet::feeSettings().key, kMaxSeq, _))
|
||||
.WillRepeatedly(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
runSpawn([this](auto yield) {
|
||||
|
||||
@@ -84,7 +84,7 @@ TEST_F(ETLLedgerPublisherTest, PublishLedgerHeaderWithinAgeLimit)
|
||||
auto dummyState = etl::SystemState{};
|
||||
auto publisher = impl::LedgerPublisher(ctx, backend_, mockSubscriptionManagerPtr, dummyState);
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillOnce(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
EXPECT_CALL(*backend_, fetchAllTransactionsInLedger(kSeq, _))
|
||||
.WillOnce(Return(std::vector<TransactionAndMetadata>{}));
|
||||
@@ -134,7 +134,7 @@ TEST_F(ETLLedgerPublisherTest, PublishLedgerHeaderInRange)
|
||||
auto publisher = impl::LedgerPublisher(ctx, backend_, mockSubscriptionManagerPtr, dummyState);
|
||||
backend_->setRange(kSeq - 1, kSeq);
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillOnce(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
TransactionAndMetadata t1;
|
||||
@@ -183,7 +183,7 @@ TEST_F(ETLLedgerPublisherTest, PublishLedgerHeaderCloseTimeGreaterThanNow)
|
||||
|
||||
auto publisher = impl::LedgerPublisher(ctx, backend_, mockSubscriptionManagerPtr, dummyState);
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillOnce(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
TransactionAndMetadata t1;
|
||||
@@ -261,7 +261,7 @@ TEST_F(ETLLedgerPublisherTest, PublishMultipleTxInOrder)
|
||||
auto publisher = impl::LedgerPublisher(ctx, backend_, mockSubscriptionManagerPtr, dummyState);
|
||||
backend_->setRange(kSeq - 1, kSeq);
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillOnce(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
// t1 index > t2 index
|
||||
@@ -342,9 +342,9 @@ TEST_F(ETLLedgerPublisherTest, PublishMultipleLedgersInQuickSuccession)
|
||||
auto publisher = impl::LedgerPublisher(ctx, backend_, mockSubscriptionManagerPtr, dummyState);
|
||||
backend_->setRange(kSeq - 1, kSeq + 1);
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillOnce(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq + 1, _))
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq + 1, _))
|
||||
.WillOnce(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
EXPECT_CALL(*backend_, fetchAllTransactionsInLedger(kSeq, _))
|
||||
|
||||
@@ -639,7 +639,8 @@ TEST_F(RPCHelpersTest, isDeepFrozen_TrustLineIsDeepFrozen)
|
||||
auto const account2 = getAccountIdWithString(kAccount2);
|
||||
|
||||
// create a trustline between account and account2 and is deep frozen
|
||||
auto const trustLineKey = xrpl::keylet::line(account, account2, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustLineKey =
|
||||
xrpl::keylet::trustLine(account, account2, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustlineDeepFrozen = createRippleStateLedgerObject(
|
||||
"USD", kAccount, 8, kAccount, 1000, kAccount2, 2000, kIndex1, 2, xrpl::lsfLowDeepFreeze
|
||||
);
|
||||
@@ -660,7 +661,8 @@ TEST_F(RPCHelpersTest, isDeepFrozen_TrustLineIsNotDeepFrozen)
|
||||
auto const account2 = getAccountIdWithString(kAccount2);
|
||||
|
||||
// create a trustline between account and account2 that is frozen (NOT DeepFrozen)
|
||||
auto const trustLineKey = xrpl::keylet::line(account, account2, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustLineKey =
|
||||
xrpl::keylet::trustLine(account, account2, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustlineFrozen = createRippleStateLedgerObject(
|
||||
"USD", kAccount, 8, kAccount, 1000, kAccount2, 2000, kIndex1, 2, xrpl::lsfLowFreeze
|
||||
);
|
||||
@@ -680,7 +682,8 @@ TEST_F(RPCHelpersTest, isDeepFrozen_IssuerAndAccountIsSameWillNotBeDeepFrozen)
|
||||
auto const account = getAccountIdWithString(kAccount);
|
||||
auto const issuer = getAccountIdWithString(kAccount2);
|
||||
|
||||
auto const trustLineKey = xrpl::keylet::line(account, issuer, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustLineKey =
|
||||
xrpl::keylet::trustLine(account, issuer, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustlineDeepFrozen = createRippleStateLedgerObject(
|
||||
"USD", kAccount, 8, kAccount, 1000, kAccount2, 2000, kIndex1, 2, xrpl::lsfLowDeepFreeze
|
||||
);
|
||||
@@ -720,7 +723,8 @@ TEST_F(RPCHelpersTest, isFrozen_IssuerAndAccountIsSameWillNotBeFrozen)
|
||||
auto const account = getAccountIdWithString(kAccount);
|
||||
auto const issuer = getAccountIdWithString(kAccount2);
|
||||
|
||||
auto const trustLineKey = xrpl::keylet::line(account, issuer, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustLineKey =
|
||||
xrpl::keylet::trustLine(account, issuer, xrpl::Currency{kCurrency}).key;
|
||||
auto const trustlineDeepFrozen = createRippleStateLedgerObject(
|
||||
"USD", kAccount, 8, kAccount, 1000, kAccount2, 2000, kIndex1, 2, xrpl::lsfHighFreeze
|
||||
);
|
||||
@@ -741,7 +745,7 @@ TEST_F(RPCHelpersTest, isFrozen_IssuerTrustLineIsFrozen)
|
||||
auto const issuer = getAccountIdWithString(kAccount2);
|
||||
xrpl::Currency const currency{kCurrency};
|
||||
|
||||
auto const trustLineKey = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const trustLineKey = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
|
||||
// issuer is higher than account, so the correct flag to set is High freeze
|
||||
auto const trustlineFrozen = createRippleStateLedgerObject(
|
||||
@@ -762,7 +766,7 @@ TEST_F(RPCHelpersTest, isFrozen_IssuerWithLowFreezeIsNotFrozen)
|
||||
auto const issuer = getAccountIdWithString(kAccount2);
|
||||
xrpl::Currency const currency{kCurrency};
|
||||
|
||||
auto const trustLineKey = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const trustLineKey = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
|
||||
// issuer is higher than account, but the flag set here is low freeze
|
||||
auto const trustlineFrozen = createRippleStateLedgerObject(
|
||||
@@ -783,7 +787,7 @@ TEST_F(RPCHelpersTest, AccountHolds_TrustLineNotfrozen)
|
||||
auto const issuer = getAccountIdWithString(kAccount2);
|
||||
xrpl::Currency const currency{kCurrency};
|
||||
|
||||
auto const trustLineKey = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const trustLineKey = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
auto const trustLine = createRippleStateLedgerObject(
|
||||
kCurrency, kAccount2, 500, kAccount, 1000, kAccount2, 1000, kTxnId, 1, 0
|
||||
);
|
||||
@@ -813,7 +817,7 @@ TEST_F(RPCHelpersTest, AccountHolds_NoTrustLine)
|
||||
auto const issuer = getAccountIdWithString(kAccount2);
|
||||
xrpl::Currency const currency{kCurrency};
|
||||
|
||||
auto const key = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const key = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
|
||||
// return no trustline found
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(key, kLedgerSeqObject, _))
|
||||
@@ -842,7 +846,7 @@ TEST_F(RPCHelpersTest, AccountHolds_TrustLineButFrozen)
|
||||
xrpl::Currency const currency{kCurrency};
|
||||
|
||||
// balance of 500, but trustline is frozen
|
||||
auto const trustLineKey = xrpl::keylet::line(account, issuer, currency).key;
|
||||
auto const trustLineKey = xrpl::keylet::trustLine(account, issuer, currency).key;
|
||||
|
||||
auto const trustLine = createRippleStateLedgerObject(
|
||||
kCurrency, kAccount2, 500, kAccount, 1000, kAccount2, 1000, kTxnId, 1, xrpl::lsfHighFreeze
|
||||
@@ -875,7 +879,7 @@ TEST_F(RPCHelpersTest, AccountHoldsFixLPTAmendmentDisabled)
|
||||
kLptokenCurrency, kAmmAccount, 100, kAccount, 100, kAmmAccount, 100, kTxnId, 3
|
||||
);
|
||||
auto const lptRippleStateKk =
|
||||
xrpl::keylet::line(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
xrpl::keylet::trustLine(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
|
||||
// trustline fetched twice. once in accountHolds and once in isFrozen
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(lptRippleStateKk, testing::_, testing::_))
|
||||
@@ -921,7 +925,7 @@ TEST_F(RPCHelpersTest, AccountHoldsLPTokenNotAMMAccount)
|
||||
"USD", kAccount2, 100, kAccount, 100, kAccount2, 100, kTxnId, 3
|
||||
);
|
||||
auto const usdRippleStateKk =
|
||||
xrpl::keylet::line(account2, account, xrpl::toCurrency("USD")).key;
|
||||
xrpl::keylet::trustLine(account2, account, xrpl::toCurrency("USD")).key;
|
||||
|
||||
// trustline fetched twice. once in accountHolds and once in isFrozen
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(usdRippleStateKk, testing::_, testing::_))
|
||||
@@ -967,7 +971,7 @@ TEST_F(RPCHelpersTest, AccountHoldsLPTokenAsset1Frozen)
|
||||
kLptokenCurrency, kAmmAccount, 100, kAccount, 100, kAmmAccount, 100, kTxnId, 3
|
||||
);
|
||||
auto const lptRippleStateKk =
|
||||
xrpl::keylet::line(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
xrpl::keylet::trustLine(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
|
||||
// trustline fetched twice. once in accountHolds and once in isFrozen
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(lptRippleStateKk, testing::_, testing::_))
|
||||
@@ -1030,7 +1034,7 @@ TEST_F(RPCHelpersTest, AccountHoldsLPTokenAsset2Frozen)
|
||||
kLptokenCurrency, kAmmAccount, 100, kAccount, 100, kAmmAccount, 100, kTxnId, 3
|
||||
);
|
||||
auto const lptRippleStateKk =
|
||||
xrpl::keylet::line(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
xrpl::keylet::trustLine(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
|
||||
// trustline fetched twice. once in accountHolds and once in isFrozen
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(lptRippleStateKk, testing::_, testing::_)).Times(2);
|
||||
@@ -1092,7 +1096,7 @@ TEST_F(RPCHelpersTest, AccountHoldsLPTokenUnfrozen)
|
||||
kLptokenCurrency, kAmmAccount, 100, kAccount, 100, kAmmAccount, 100, kTxnId, 3
|
||||
);
|
||||
auto const lptRippleStateKk =
|
||||
xrpl::keylet::line(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
xrpl::keylet::trustLine(ammAccount, account, xrpl::toCurrency(kLptokenCurrency)).key;
|
||||
|
||||
// trustline fetched twice. once in accountHolds and once in isFrozen
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(lptRippleStateKk, testing::_, testing::_))
|
||||
@@ -1129,7 +1133,8 @@ TEST_F(RPCHelpersTest, AccountHoldsLPTokenUnfrozen)
|
||||
|
||||
auto const usdRippleState =
|
||||
createRippleStateLedgerObject("USD", kIssuer, 100, kAccount, 100, kIssuer, 100, kTxnId, 3);
|
||||
auto const usdRippleStateKk = xrpl::keylet::line(issuer, account, xrpl::toCurrency("USD")).key;
|
||||
auto const usdRippleStateKk =
|
||||
xrpl::keylet::trustLine(issuer, account, xrpl::toCurrency("USD")).key;
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(usdRippleStateKk, testing::_, testing::_))
|
||||
.WillOnce(Return(usdRippleState.getSerializer().peekData()));
|
||||
|
||||
@@ -350,8 +350,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathMinimalFirstXRPNoTrustline)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj = createAmmObject(
|
||||
@@ -432,8 +433,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAccount)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account2, account1, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account2, account1, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
accountRoot.setFieldH256(xrpl::sfAMMID, ammKey);
|
||||
@@ -447,7 +449,7 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAccount)
|
||||
kLpIssueCurrency
|
||||
);
|
||||
auto const lptCurrency = createLptCurrency("XRP", "JPY");
|
||||
auto const accountHoldsKeylet = xrpl::keylet::line(account2, account2, lptCurrency);
|
||||
auto const accountHoldsKeylet = xrpl::keylet::trustLine(account2, account2, lptCurrency);
|
||||
auto const feesObj = createLegacyFeeSettingBlob(1, 2, 3, 4, 0);
|
||||
auto const trustline = createRippleStateLedgerObject(
|
||||
kLpIssueCurrency, kAmmAccount, 12, kAmmAccounT2, 1000, kAmmAccount, 2000, kIndex1, 2
|
||||
@@ -524,8 +526,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathMinimalSecondXRPNoTrustline)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj = createAmmObject(
|
||||
@@ -606,8 +609,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathNonXRPNoTrustlines)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj =
|
||||
@@ -689,9 +693,11 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathFrozen)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue1LineKey = xrpl::keylet::line(account1, account1, xrpl::toCurrency("USD")).key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue1LineKey =
|
||||
xrpl::keylet::trustLine(account1, account1, xrpl::toCurrency("USD")).key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj =
|
||||
@@ -801,9 +807,11 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathFrozenIssuer)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue1LineKey = xrpl::keylet::line(account1, account1, xrpl::toCurrency("USD")).key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue1LineKey =
|
||||
xrpl::keylet::trustLine(account1, account1, xrpl::toCurrency("USD")).key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
// asset1 will be frozen because flag set here
|
||||
auto accountRoot =
|
||||
@@ -915,8 +923,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithTrustline)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj = createAmmObject(
|
||||
@@ -1000,8 +1009,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithVoteSlots)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj = createAmmObject(
|
||||
@@ -1101,8 +1111,9 @@ TEST_F(RPCAMMInfoHandlerTest, HappyPathWithAuctionSlot)
|
||||
auto const lgrInfo = createLedgerHeader(kLedgerHash, kSeq);
|
||||
auto const ammKey = xrpl::uint256{kAmmId};
|
||||
auto const ammKeylet = xrpl::keylet::amm(ammKey);
|
||||
auto const feesKey = xrpl::keylet::fees().key;
|
||||
auto const issue2LineKey = xrpl::keylet::line(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
auto const feesKey = xrpl::keylet::feeSettings().key;
|
||||
auto const issue2LineKey =
|
||||
xrpl::keylet::trustLine(account1, account2, xrpl::toCurrency("JPY")).key;
|
||||
|
||||
auto accountRoot = createAccountRootObject(kAmmAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
auto ammObj = createAmmObject(
|
||||
|
||||
@@ -305,7 +305,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsInvalid)
|
||||
auto const accountRoot = createAccountRootObject(kAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(accountKk, 30, _))
|
||||
.WillByDefault(Return(accountRoot.getSerializer().peekData()));
|
||||
auto signersKey = xrpl::keylet::signers(account).key;
|
||||
auto signersKey = xrpl::keylet::signerList(account).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(signersKey, 30, _))
|
||||
.WillByDefault(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::DisallowIncoming, _))
|
||||
@@ -407,7 +407,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV2)
|
||||
auto const accountRoot = createAccountRootObject(kAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(accountKk, 30, _))
|
||||
.WillByDefault(Return(accountRoot.getSerializer().peekData()));
|
||||
auto signersKey = xrpl::keylet::signers(account).key;
|
||||
auto signersKey = xrpl::keylet::signerList(account).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(signersKey, 30, _))
|
||||
.WillByDefault(
|
||||
Return(createSignerLists({{kAccount1, 1}, {kAccount2, 1}}).getSerializer().peekData())
|
||||
@@ -509,7 +509,7 @@ TEST_F(RPCAccountInfoHandlerTest, SignerListsTrueV1)
|
||||
auto const accountRoot = createAccountRootObject(kAccount, 0, 2, 200, 2, kIndex1, 2);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(accountKk, 30, _))
|
||||
.WillByDefault(Return(accountRoot.getSerializer().peekData()));
|
||||
auto signersKey = xrpl::keylet::signers(account).key;
|
||||
auto signersKey = xrpl::keylet::signerList(account).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(signersKey, 30, _))
|
||||
.WillByDefault(
|
||||
Return(createSignerLists({{kAccount1, 1}, {kAccount2, 1}}).getSerializer().peekData())
|
||||
@@ -668,7 +668,7 @@ TEST_F(RPCAccountInfoHandlerTest, EmptySignerLists)
|
||||
EXPECT_CALL(*mockAmendmentCenterPtr_, isEnabled(_, Amendments::TokenEscrow, _))
|
||||
.WillOnce(Return(false));
|
||||
|
||||
auto signersKey = xrpl::keylet::signers(account).key;
|
||||
auto signersKey = xrpl::keylet::signerList(account).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(signersKey, 30, _))
|
||||
.WillByDefault(Return(std::optional<Blob>{}));
|
||||
|
||||
|
||||
@@ -864,12 +864,12 @@ TEST_F(RPCAccountMPTokenIssuancesHandlerTest, EmptyResult)
|
||||
|
||||
TEST_F(RPCAccountMPTokenIssuancesHandlerTest, MutableFlags)
|
||||
{
|
||||
uint32_t const mutableFlags1 = xrpl::lsmfMPTCanMutateCanLock |
|
||||
xrpl::lsmfMPTCanMutateRequireAuth | xrpl::lsmfMPTCanMutateCanEscrow |
|
||||
xrpl::lsmfMPTCanMutateCanTrade;
|
||||
uint32_t const mutableFlags1 = xrpl::lsmfMPTCanEnableCanLock |
|
||||
xrpl::lsmfMPTCanEnableRequireAuth | xrpl::lsmfMPTCanEnableCanEscrow |
|
||||
xrpl::lsmfMPTCanEnableCanTrade;
|
||||
|
||||
uint32_t const mutableFlags2 = xrpl::lsmfMPTCanMutateCanTransfer |
|
||||
xrpl::lsmfMPTCanMutateCanClawback | xrpl::lsmfMPTCanMutateMetadata |
|
||||
uint32_t const mutableFlags2 = xrpl::lsmfMPTCanEnableCanTransfer |
|
||||
xrpl::lsmfMPTCanEnableCanClawback | xrpl::lsmfMPTCanMutateMetadata |
|
||||
xrpl::lsmfMPTCanMutateTransferFee;
|
||||
|
||||
auto const ledgerHeader = createLedgerHeader(kLedgerHash, 30);
|
||||
@@ -1088,22 +1088,22 @@ generateSingleMutableFlagTests()
|
||||
{
|
||||
return std::vector<SingleMutableFlagTest>{
|
||||
{.testName = "CanMutateCanLock",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateCanLock,
|
||||
.mutableFlag = xrpl::lsmfMPTCanEnableCanLock,
|
||||
.expectedJsonKey = "mpt_can_mutate_can_lock"},
|
||||
{.testName = "CanMutateRequireAuth",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateRequireAuth,
|
||||
.mutableFlag = xrpl::lsmfMPTCanEnableRequireAuth,
|
||||
.expectedJsonKey = "mpt_can_mutate_require_auth"},
|
||||
{.testName = "CanMutateCanEscrow",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateCanEscrow,
|
||||
.mutableFlag = xrpl::lsmfMPTCanEnableCanEscrow,
|
||||
.expectedJsonKey = "mpt_can_mutate_can_escrow"},
|
||||
{.testName = "CanMutateCanTrade",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateCanTrade,
|
||||
.mutableFlag = xrpl::lsmfMPTCanEnableCanTrade,
|
||||
.expectedJsonKey = "mpt_can_mutate_can_trade"},
|
||||
{.testName = "CanMutateCanTransfer",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateCanTransfer,
|
||||
.mutableFlag = xrpl::lsmfMPTCanEnableCanTransfer,
|
||||
.expectedJsonKey = "mpt_can_mutate_can_transfer"},
|
||||
{.testName = "CanMutateCanClawback",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateCanClawback,
|
||||
.mutableFlag = xrpl::lsmfMPTCanEnableCanClawback,
|
||||
.expectedJsonKey = "mpt_can_mutate_can_clawback"},
|
||||
{.testName = "CanMutateMetadata",
|
||||
.mutableFlag = xrpl::lsmfMPTCanMutateMetadata,
|
||||
|
||||
@@ -311,7 +311,7 @@ TEST_F(RPCAccountNFTsHandlerTest, NormalPath)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::account(accountID).key, 30, _))
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
|
||||
auto const firstPage = xrpl::keylet::nftpageMax(accountID).key;
|
||||
auto const firstPage = xrpl::keylet::nftokenPageMax(accountID).key;
|
||||
auto const pageObject = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, std::nullopt
|
||||
);
|
||||
@@ -348,7 +348,7 @@ TEST_F(RPCAccountNFTsHandlerTest, Limit)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::account(accountID).key, 30, _))
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
|
||||
auto const firstPage = xrpl::keylet::nftpageMax(accountID).key;
|
||||
auto const firstPage = xrpl::keylet::nftokenPageMax(accountID).key;
|
||||
auto const pageObject = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, firstPage
|
||||
);
|
||||
@@ -551,7 +551,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LimitLessThanMin)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::account(accountID).key, 30, _))
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
|
||||
auto const firstPage = xrpl::keylet::nftpageMax(accountID).key;
|
||||
auto const firstPage = xrpl::keylet::nftokenPageMax(accountID).key;
|
||||
auto const pageObject = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, std::nullopt
|
||||
);
|
||||
@@ -617,7 +617,7 @@ TEST_F(RPCAccountNFTsHandlerTest, LimitMoreThanMax)
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::account(accountID).key, 30, _))
|
||||
.WillByDefault(Return(accountObject.getSerializer().peekData()));
|
||||
|
||||
auto const firstPage = xrpl::keylet::nftpageMax(accountID).key;
|
||||
auto const firstPage = xrpl::keylet::nftokenPageMax(accountID).key;
|
||||
auto const pageObject = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, std::nullopt
|
||||
);
|
||||
|
||||
@@ -355,7 +355,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DefaultParameterNoNFTFound)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -403,7 +403,7 @@ TEST_F(RPCAccountObjectsHandlerTest, Limit)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -511,7 +511,7 @@ TEST_F(RPCAccountObjectsHandlerTest, MultipleDirNoNFT)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -565,7 +565,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilter)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -623,7 +623,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterAmmType)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -676,7 +676,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterReturnEmpty)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -734,7 +734,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilter)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
auto const line = createRippleStateLedgerObject(
|
||||
@@ -795,7 +795,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilterWithTypeFilter)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
auto const line = createRippleStateLedgerObject(
|
||||
@@ -846,7 +846,7 @@ TEST_F(RPCAccountObjectsHandlerTest, DeletionBlockersOnlyFilterEmptyResult)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
auto const offer1 = createOfferLedgerObject(
|
||||
@@ -913,7 +913,7 @@ TEST_F(
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(ownerDirKk, 30, _))
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
auto const offer1 = createOfferLedgerObject(
|
||||
@@ -1041,9 +1041,10 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMixOtherObjects)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft page 1
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
auto const nftPage2KK =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{kIndex1}).key;
|
||||
xrpl::keylet::nftokenPage(xrpl::keylet::nftokenPageMin(account), xrpl::uint256{kIndex1})
|
||||
.key;
|
||||
auto const nftpage1 = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, nftPage2KK
|
||||
);
|
||||
@@ -1092,14 +1093,15 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTReachLimitReturnMarker)
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(accountKk, kMaxSeq, _))
|
||||
.WillOnce(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
auto current = xrpl::keylet::nftpageMax(account).key;
|
||||
auto current = xrpl::keylet::nftokenPageMax(account).key;
|
||||
std::string first{kIndex1};
|
||||
std::ranges::sort(first);
|
||||
for (auto i = 0; i < 10; i++) {
|
||||
std::ranges::next_permutation(first);
|
||||
auto previous =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{first.c_str()})
|
||||
.key;
|
||||
auto previous = xrpl::keylet::nftokenPage(
|
||||
xrpl::keylet::nftokenPageMin(account), xrpl::uint256{first.c_str()}
|
||||
)
|
||||
.key;
|
||||
auto const nftpage = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, previous
|
||||
);
|
||||
@@ -1141,14 +1143,15 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTReachLimitNoMarker)
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(accountKk, kMaxSeq, _))
|
||||
.WillOnce(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
auto current = xrpl::keylet::nftpageMax(account).key;
|
||||
auto current = xrpl::keylet::nftokenPageMax(account).key;
|
||||
std::string first{kIndex1};
|
||||
std::ranges::sort(first);
|
||||
for (auto i = 0; i < 10; i++) {
|
||||
std::ranges::next_permutation(first);
|
||||
auto previous =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{first.c_str()})
|
||||
.key;
|
||||
auto previous = xrpl::keylet::nftokenPage(
|
||||
xrpl::keylet::nftokenPageMin(account), xrpl::uint256{first.c_str()}
|
||||
)
|
||||
.key;
|
||||
auto const nftpage = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, previous
|
||||
);
|
||||
@@ -1201,15 +1204,18 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMarker)
|
||||
.WillOnce(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
std::string first{kIndex1};
|
||||
auto current =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{first.c_str()}).key;
|
||||
auto current = xrpl::keylet::nftokenPage(
|
||||
xrpl::keylet::nftokenPageMin(account), xrpl::uint256{first.c_str()}
|
||||
)
|
||||
.key;
|
||||
auto const marker = current;
|
||||
std::ranges::sort(first);
|
||||
for (auto i = 0; i < 10; i++) {
|
||||
std::ranges::next_permutation(first);
|
||||
auto previous =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{first.c_str()})
|
||||
.key;
|
||||
auto previous = xrpl::keylet::nftokenPage(
|
||||
xrpl::keylet::nftokenPageMin(account), xrpl::uint256{first.c_str()}
|
||||
)
|
||||
.key;
|
||||
auto const nftpage = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, previous
|
||||
);
|
||||
@@ -1381,7 +1387,7 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTMarkerNotExist)
|
||||
.WillOnce(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
// return null for this marker
|
||||
auto const accountNftMax = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const accountNftMax = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(accountNftMax, kMaxSeq, _))
|
||||
.WillOnce(Return(std::nullopt));
|
||||
|
||||
@@ -1418,15 +1424,18 @@ TEST_F(RPCAccountObjectsHandlerTest, NFTLimitAdjust)
|
||||
.WillOnce(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
std::string first{kIndex1};
|
||||
auto current =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{first.c_str()}).key;
|
||||
auto current = xrpl::keylet::nftokenPage(
|
||||
xrpl::keylet::nftokenPageMin(account), xrpl::uint256{first.c_str()}
|
||||
)
|
||||
.key;
|
||||
auto const marker = current;
|
||||
std::ranges::sort(first);
|
||||
for (auto i = 0; i < 10; i++) {
|
||||
std::ranges::next_permutation(first);
|
||||
auto previous =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{first.c_str()})
|
||||
.key;
|
||||
auto previous = xrpl::keylet::nftokenPage(
|
||||
xrpl::keylet::nftokenPageMin(account), xrpl::uint256{first.c_str()}
|
||||
)
|
||||
.key;
|
||||
auto const nftpage = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, previous
|
||||
);
|
||||
@@ -1552,9 +1561,10 @@ TEST_F(RPCAccountObjectsHandlerTest, FilterNFT)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft page 1
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
auto const nftPage2KK =
|
||||
xrpl::keylet::nftpage(xrpl::keylet::nftpageMin(account), xrpl::uint256{kIndex1}).key;
|
||||
xrpl::keylet::nftokenPage(xrpl::keylet::nftokenPageMin(account), xrpl::uint256{kIndex1})
|
||||
.key;
|
||||
auto const nftpage1 = createNftTokenPage(
|
||||
std::vector{std::make_pair<std::string, std::string>(kTokenId, "www.ok.com")}, nftPage2KK
|
||||
);
|
||||
@@ -1698,7 +1708,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LimitLessThanMin)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -1779,7 +1789,7 @@ TEST_F(RPCAccountObjectsHandlerTest, LimitMoreThanMax)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -1825,7 +1835,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterMPTIssuanceType)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
@@ -1877,7 +1887,7 @@ TEST_F(RPCAccountObjectsHandlerTest, TypeFilterMPTokenType)
|
||||
.WillOnce(Return(ownerDir.getSerializer().peekData()));
|
||||
|
||||
// nft null
|
||||
auto const nftMaxKK = xrpl::keylet::nftpageMax(account).key;
|
||||
auto const nftMaxKK = xrpl::keylet::nftokenPageMax(account).key;
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(nftMaxKK, 30, _)).WillOnce(Return(std::nullopt));
|
||||
|
||||
std::vector<Blob> bbs;
|
||||
|
||||
@@ -709,7 +709,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
// fee settings: base ->3 inc->2, account2 has 2 objects ,total
|
||||
// reserve ->7
|
||||
// owner_funds should be 193
|
||||
{xrpl::keylet::fees().key, feeLedgerObject}
|
||||
{xrpl::keylet::feeSettings().key, feeLedgerObject}
|
||||
},
|
||||
.ledgerObjectCalls = 5,
|
||||
.mockedOffers = std::vector<xrpl::STObject>{gets10XRPPays20USDOffer},
|
||||
@@ -775,7 +775,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
// fee settings: base ->3 inc->2, account2 has 2 objects
|
||||
// ,total
|
||||
// reserve ->7
|
||||
{xrpl::keylet::fees().key, feeLedgerObject}
|
||||
{xrpl::keylet::feeSettings().key, feeLedgerObject}
|
||||
},
|
||||
.ledgerObjectCalls = 5,
|
||||
.mockedOffers = std::vector<xrpl::STObject>{gets10XRPPays20USDOffer},
|
||||
@@ -1033,7 +1033,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
.getSerializer()
|
||||
.peekData()},
|
||||
// trust line between gets issuer and owner,owner has 8 USD
|
||||
{xrpl::keylet::line(account2, account, xrpl::toCurrency("USD")).key,
|
||||
{xrpl::keylet::trustLine(account2, account, xrpl::toCurrency("USD")).key,
|
||||
trustline8Balance.getSerializer().peekData()},
|
||||
},
|
||||
.ledgerObjectCalls = 6,
|
||||
@@ -1103,7 +1103,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
.getSerializer()
|
||||
.peekData()},
|
||||
// trust line between gets issuer and owner,owner has 30 USD
|
||||
{xrpl::keylet::line(account2, account, xrpl::toCurrency("USD")).key,
|
||||
{xrpl::keylet::trustLine(account2, account, xrpl::toCurrency("USD")).key,
|
||||
trustline30Balance.getSerializer().peekData()},
|
||||
},
|
||||
.ledgerObjectCalls = 6,
|
||||
@@ -1258,7 +1258,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
.getSerializer()
|
||||
.peekData()},
|
||||
// trust line between gets issuer and owner,owner has 8 USD
|
||||
{xrpl::keylet::line(account2, account, xrpl::toCurrency("USD")).key,
|
||||
{xrpl::keylet::trustLine(account2, account, xrpl::toCurrency("USD")).key,
|
||||
frozenTrustLine.getSerializer().peekData()},
|
||||
},
|
||||
.ledgerObjectCalls = 6,
|
||||
@@ -1392,7 +1392,7 @@ generateNormalPathBookOffersTestBundles()
|
||||
)
|
||||
.getSerializer()
|
||||
.peekData()},
|
||||
{xrpl::keylet::line(account2, account, xrpl::toCurrency("USD")).key,
|
||||
{xrpl::keylet::trustLine(account2, account, xrpl::toCurrency("USD")).key,
|
||||
frozenTrustLine.getSerializer().peekData()},
|
||||
|
||||
},
|
||||
@@ -1583,7 +1583,7 @@ TEST_F(RPCBookOffersHandlerTest, Limit)
|
||||
createAccountRootObject(kAccount2, 0, 2, 200, 2, kIndex1, 2).getSerializer().peekData()
|
||||
));
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, seq, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, seq, _))
|
||||
.WillByDefault(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::account(issuer).key, seq, _))
|
||||
@@ -1669,7 +1669,7 @@ TEST_F(RPCBookOffersHandlerTest, LimitMoreThanMax)
|
||||
createAccountRootObject(kAccount2, 0, 2, 200, 2, kIndex1, 2).getSerializer().peekData()
|
||||
));
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, seq, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, seq, _))
|
||||
.WillByDefault(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::account(issuer).key, seq, _))
|
||||
|
||||
@@ -2853,7 +2853,7 @@ generateTestValuesForNormalPathTest()
|
||||
kAccount,
|
||||
kAccount2
|
||||
),
|
||||
.expectedIndex = xrpl::keylet::line(account1, account2, currency).key,
|
||||
.expectedIndex = xrpl::keylet::trustLine(account1, account2, currency).key,
|
||||
.mockedEntity = createRippleStateLedgerObject(
|
||||
"USD", kAccount2, 100, kAccount, 10, kAccount2, 20, kIndex1, 123, 0
|
||||
)
|
||||
@@ -3167,7 +3167,7 @@ generateTestValuesForNormalPathTest()
|
||||
}})JSON",
|
||||
xrpl::to_string(xrpl::makeMptID(2, account1))
|
||||
),
|
||||
.expectedIndex = xrpl::keylet::mptIssuance(xrpl::makeMptID(2, account1)).key,
|
||||
.expectedIndex = xrpl::keylet::mptokenIssuance(xrpl::makeMptID(2, account1)).key,
|
||||
.mockedEntity = createMptIssuanceObject(kAccount, 2, "metadata")
|
||||
},
|
||||
NormalPathTestBundle{
|
||||
@@ -3310,7 +3310,7 @@ generateTestValuesForNormalPathTest()
|
||||
kAccount,
|
||||
kRangeMax
|
||||
),
|
||||
.expectedIndex = xrpl::keylet::loanbroker(
|
||||
.expectedIndex = xrpl::keylet::loanBroker(
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
*xrpl::parseBase58<xrpl::AccountID>(kAccount),
|
||||
kRangeMax
|
||||
@@ -3545,7 +3545,7 @@ TEST_F(RPCLedgerEntryTest, LoanBroker_BinaryFalse)
|
||||
kAccount, kAccount, kRangeMax, xrpl::uint256{kIndex1}, 1, xrpl::uint256{1}, 0
|
||||
);
|
||||
|
||||
auto const loanBrokerKey = xrpl::keylet::loanbroker(
|
||||
auto const loanBrokerKey = xrpl::keylet::loanBroker(
|
||||
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
||||
*xrpl::parseBase58<xrpl::AccountID>(kAccount),
|
||||
kRangeMax
|
||||
@@ -4150,7 +4150,9 @@ TEST_F(RPCLedgerEntryTest, SyntheticMPTIssuanceID)
|
||||
|
||||
// return valid ledger entry which can be deserialized
|
||||
auto const ledgerEntry = createMptIssuanceObject(kAccount, 2, "metadata");
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::mptIssuance(mptId).key, kRangeMax, _))
|
||||
EXPECT_CALL(
|
||||
*backend_, doFetchLedgerObject(xrpl::keylet::mptokenIssuance(mptId).key, kRangeMax, _)
|
||||
)
|
||||
.WillRepeatedly(Return(ledgerEntry.getSerializer().peekData()));
|
||||
|
||||
runSpawn([&, this](auto yield) {
|
||||
|
||||
@@ -1033,7 +1033,7 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsTrueBinaryFalse)
|
||||
|
||||
// fee object 2*2+3->7 ; balance 200 - 7 -> 193
|
||||
auto feeBlob = createLegacyFeeSettingBlob(1, 2 /*reserve inc*/, 3 /*reserve base*/, 4, 0);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kRangeMax, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kRangeMax, _))
|
||||
.WillByDefault(Return(feeBlob));
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
@@ -1108,7 +1108,7 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsTrueBinaryTrue)
|
||||
|
||||
// fee object 2*2+3->7 ; balance 200 - 7 -> 193
|
||||
auto feeBlob = createLegacyFeeSettingBlob(1, 2 /*reserve inc*/, 3 /*reserve base*/, 4, 0);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kRangeMax, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kRangeMax, _))
|
||||
.WillByDefault(Return(feeBlob));
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
@@ -1222,7 +1222,7 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsNotEnoughForReserve)
|
||||
|
||||
// fee object 2*2+3->7 ; balance 6 - 7 -> -1
|
||||
auto feeBlob = createLegacyFeeSettingBlob(1, 2 /*reserve inc*/, 3 /*reserve base*/, 4, 0);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kRangeMax, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kRangeMax, _))
|
||||
.WillByDefault(Return(feeBlob));
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(2);
|
||||
@@ -1268,7 +1268,7 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsNotXRP)
|
||||
auto const line = createRippleStateLedgerObject(
|
||||
kCurrency, kAccount2, 50 /*balance*/, kAccount, 10, kAccount2, 20, kIndex1, 123
|
||||
);
|
||||
auto lineKey = xrpl::keylet::line(
|
||||
auto lineKey = xrpl::keylet::trustLine(
|
||||
getAccountIdWithString(kAccount),
|
||||
getAccountIdWithString(kAccount2),
|
||||
xrpl::toCurrency(std::string(kCurrency))
|
||||
@@ -1336,7 +1336,7 @@ TEST_F(RPCLedgerHandlerTest, OwnerFundsIgnoreFreezeLine)
|
||||
123,
|
||||
xrpl::lsfLowFreeze | xrpl::lsfHighFreeze
|
||||
);
|
||||
auto lineKey = xrpl::keylet::line(
|
||||
auto lineKey = xrpl::keylet::trustLine(
|
||||
getAccountIdWithString(kAccount),
|
||||
getAccountIdWithString(kAccount2),
|
||||
xrpl::toCurrency(std::string(kCurrency))
|
||||
|
||||
@@ -393,7 +393,7 @@ TEST_F(RPCMPTHoldersHandlerTest, DefaultParameters)
|
||||
|
||||
auto ledgerInfo = createLedgerHeader(kLedgerHash, 30);
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).WillOnce(Return(ledgerInfo));
|
||||
auto const issuanceKk = xrpl::keylet::mptIssuance(xrpl::uint192(kMptId)).key;
|
||||
auto const issuanceKk = xrpl::keylet::mptokenIssuance(xrpl::uint192(kMptId)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issuanceKk, 30, _))
|
||||
.WillByDefault(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
@@ -447,7 +447,7 @@ TEST_F(RPCMPTHoldersHandlerTest, CustomAmounts)
|
||||
|
||||
auto ledgerInfo = createLedgerHeader(kLedgerHash, 30);
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).WillOnce(Return(ledgerInfo));
|
||||
auto const issuanceKk = xrpl::keylet::mptIssuance(xrpl::uint192(kMptId)).key;
|
||||
auto const issuanceKk = xrpl::keylet::mptokenIssuance(xrpl::uint192(kMptId)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issuanceKk, 30, _))
|
||||
.WillByDefault(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
@@ -498,7 +498,7 @@ TEST_F(RPCMPTHoldersHandlerTest, SpecificLedgerIndex)
|
||||
auto ledgerInfo = createLedgerHeader(kLedgerHash, specificLedger);
|
||||
ON_CALL(*backend_, fetchLedgerBySequence(specificLedger, _)).WillByDefault(Return(ledgerInfo));
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).Times(1);
|
||||
auto const issuanceKk = xrpl::keylet::mptIssuance(xrpl::uint192(kMptId)).key;
|
||||
auto const issuanceKk = xrpl::keylet::mptokenIssuance(xrpl::uint192(kMptId)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issuanceKk, specificLedger, _))
|
||||
.WillByDefault(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
@@ -554,7 +554,7 @@ TEST_F(RPCMPTHoldersHandlerTest, MarkerParameter)
|
||||
|
||||
auto ledgerInfo = createLedgerHeader(kLedgerHash, 30);
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).WillOnce(Return(ledgerInfo));
|
||||
auto const issuanceKk = xrpl::keylet::mptIssuance(xrpl::uint192(kMptId)).key;
|
||||
auto const issuanceKk = xrpl::keylet::mptokenIssuance(xrpl::uint192(kMptId)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issuanceKk, 30, _))
|
||||
.WillByDefault(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
@@ -607,7 +607,7 @@ TEST_F(RPCMPTHoldersHandlerTest, MultipleMPTs)
|
||||
|
||||
auto ledgerInfo = createLedgerHeader(kLedgerHash, 30);
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).WillOnce(Return(ledgerInfo));
|
||||
auto const issuanceKk = xrpl::keylet::mptIssuance(xrpl::uint192(kMptId)).key;
|
||||
auto const issuanceKk = xrpl::keylet::mptokenIssuance(xrpl::uint192(kMptId)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issuanceKk, 30, _))
|
||||
.WillByDefault(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
@@ -658,7 +658,7 @@ TEST_F(RPCMPTHoldersHandlerTest, LimitMoreThanMAx)
|
||||
|
||||
auto ledgerInfo = createLedgerHeader(kLedgerHash, 30);
|
||||
EXPECT_CALL(*backend_, fetchLedgerBySequence).WillOnce(Return(ledgerInfo));
|
||||
auto const issuanceKk = xrpl::keylet::mptIssuance(xrpl::uint192(kMptId)).key;
|
||||
auto const issuanceKk = xrpl::keylet::mptokenIssuance(xrpl::uint192(kMptId)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(issuanceKk, 30, _))
|
||||
.WillByDefault(Return(Blob{'f', 'a', 'k', 'e'}));
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ TEST_F(RPCNFTBuyOffersHandlerTest, ResultsForInputWithMarkerAndLimit)
|
||||
// first is nft offer object
|
||||
auto const cursor =
|
||||
xrpl::uint256{"E6DBAFC99223B42257915A63DFC6B0C032D4070F9A574B255AD97466726FC353"};
|
||||
auto const first = xrpl::keylet::nftoffer(cursor);
|
||||
auto const first = xrpl::keylet::nftokenOffer(cursor);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(cursorBuyOffer.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_)).Times(1);
|
||||
@@ -601,7 +601,7 @@ TEST_F(RPCNFTBuyOffersHandlerTest, ResultsWithoutMarkerForInputWithMarkerAndLimi
|
||||
// first is nft offer object
|
||||
auto const cursor =
|
||||
xrpl::uint256{"E6DBAFC99223B42257915A63DFC6B0C032D4070F9A574B255AD97466726FC353"};
|
||||
auto const first = xrpl::keylet::nftoffer(cursor);
|
||||
auto const first = xrpl::keylet::nftokenOffer(cursor);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(cursorBuyOffer.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_)).Times(1);
|
||||
|
||||
@@ -537,7 +537,7 @@ TEST_F(RPCNFTSellOffersHandlerTest, ResultsForInputWithMarkerAndLimit)
|
||||
// first is nft offer object
|
||||
auto const cursor =
|
||||
xrpl::uint256{"E6DBAFC99223B42257915A63DFC6B0C032D4070F9A574B255AD97466726FC353"};
|
||||
auto const first = xrpl::keylet::nftoffer(cursor);
|
||||
auto const first = xrpl::keylet::nftokenOffer(cursor);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(cursorSellOffer.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_)).Times(1);
|
||||
@@ -601,7 +601,7 @@ TEST_F(RPCNFTSellOffersHandlerTest, ResultsWithoutMarkerForInputWithMarkerAndLim
|
||||
// first is nft offer object
|
||||
auto const cursor =
|
||||
xrpl::uint256{"E6DBAFC99223B42257915A63DFC6B0C032D4070F9A574B255AD97466726FC353"};
|
||||
auto const first = xrpl::keylet::nftoffer(cursor);
|
||||
auto const first = xrpl::keylet::nftokenOffer(cursor);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_))
|
||||
.WillByDefault(Return(cursorSellOffer.getSerializer().peekData()));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(first.key, testing::_, testing::_)).Times(1);
|
||||
|
||||
@@ -589,7 +589,7 @@ TEST_F(
|
||||
auto const ownerDirKk = xrpl::keylet::ownerDir(getAccountIdWithString(kAccount)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ownerDirKk, kSeq, _))
|
||||
.WillByDefault(Return(ownerDir.getSerializer().peekData()));
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillByDefault(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(3);
|
||||
|
||||
@@ -759,7 +759,7 @@ TEST_F(RPCNoRippleCheckTest, NormalPathTransactions)
|
||||
auto const ownerDirKk = xrpl::keylet::ownerDir(getAccountIdWithString(kAccount)).key;
|
||||
ON_CALL(*backend_, doFetchLedgerObject(ownerDirKk, kSeq, _))
|
||||
.WillByDefault(Return(ownerDir.getSerializer().peekData()));
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kSeq, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kSeq, _))
|
||||
.WillByDefault(Return(createLegacyFeeSettingBlob(1, 2, 3, 4, 0)));
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject).Times(3);
|
||||
|
||||
|
||||
@@ -868,7 +868,7 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothSnapshotSet)
|
||||
|
||||
// fee
|
||||
auto feeBlob = createLegacyFeeSettingBlob(1, 2, 3, 4, 0);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kMaxSeq, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kMaxSeq, _))
|
||||
.WillByDefault(Return(feeBlob));
|
||||
|
||||
auto const gets10XRPPays20USDOffer = createOfferLedgerObject(
|
||||
@@ -1062,7 +1062,7 @@ TEST_F(RPCSubscribeHandlerTest, BooksBothUnsetSnapshotSet)
|
||||
|
||||
// fee
|
||||
auto feeBlob = createLegacyFeeSettingBlob(1, 2, 3, 4, 0);
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::fees().key, kMaxSeq, _))
|
||||
ON_CALL(*backend_, doFetchLedgerObject(xrpl::keylet::feeSettings().key, kMaxSeq, _))
|
||||
.WillByDefault(Return(feeBlob));
|
||||
|
||||
auto const gets10XRPPays20USDOffer = createOfferLedgerObject(
|
||||
|
||||
@@ -268,7 +268,7 @@ TEST_F(RPCVaultInfoHandlerTest, MissingIssuanceObject)
|
||||
);
|
||||
|
||||
auto const vaultKeylet = xrpl::keylet::vault(xrpl::uint256{kVaultId}).key;
|
||||
auto const mptIssuance = xrpl::keylet::mptIssuance(mptSharesID).key;
|
||||
auto const mptIssuance = xrpl::keylet::mptokenIssuance(mptSharesID).key;
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(vaultKeylet, kSeq, _))
|
||||
.WillOnce(Return(vault.getSerializer().peekData()));
|
||||
@@ -361,7 +361,7 @@ TEST_F(RPCVaultInfoHandlerTest, ValidVaultObjectQueryByVaultID)
|
||||
// Set up keylet based on vaultID
|
||||
auto const issuance = createMptIssuanceObject(kAccount, kSeq, "metadata");
|
||||
auto const vaultKeylet = xrpl::keylet::vault(xrpl::uint256{kVaultId}).key;
|
||||
auto const mptIssuance = xrpl::keylet::mptIssuance(mptSharesID).key;
|
||||
auto const mptIssuance = xrpl::keylet::mptokenIssuance(mptSharesID).key;
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(vaultKeylet, kSeq, _))
|
||||
.WillOnce(Return(vault.getSerializer().peekData()));
|
||||
@@ -456,7 +456,7 @@ TEST_F(RPCVaultInfoHandlerTest, ValidVaultObjectQueryByOwnerAndSeq)
|
||||
auto const account = getAccountIdWithString(kAccount);
|
||||
auto const accountKeylet = xrpl::keylet::account(account).key;
|
||||
auto const vaultKeylet = xrpl::keylet::vault(account, kSeq).key;
|
||||
auto const mptIssuance = xrpl::keylet::mptIssuance(mptSharesID).key;
|
||||
auto const mptIssuance = xrpl::keylet::mptokenIssuance(mptSharesID).key;
|
||||
|
||||
EXPECT_CALL(*backend_, doFetchLedgerObject(accountKeylet, kSeq, _))
|
||||
.WillOnce(Return(accountRoot.getSerializer().peekData()));
|
||||
|
||||
Reference in New Issue
Block a user