Compare commits

...

4 Commits

Author SHA1 Message Date
Sergey Kuznetsov
b1aafbaacb Backport compiler flags for gcc-12 2024-06-03 13:43:38 +01:00
Sergey Kuznetsov
965a2883fe Fix formatting 2024-06-03 13:11:24 +01:00
Sergey Kuznetsov
1e9eaee311 Fix formatting 2024-06-03 13:03:21 +01:00
Sergey Kuznetsov
a15ee2a8cc Updated xrpl to 2.2.0-rc3 2024-06-03 13:02:51 +01:00
7 changed files with 76 additions and 69 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -17,6 +17,13 @@ set(COMPILER_FLAGS
-pedantic
-Wpedantic
-Wunused
# FIXME: The following bunch are needed for gcc12 atm.
-Wno-missing-requires
-Wno-restrict
-Wno-null-dereference
-Wno-maybe-uninitialized
-Wno-unknown-warning-option # and this to work with clang
# TODO: Address these and others in https://github.com/XRPLF/clio/issues/1273
)
#TODO: reenable when we change CI #884

View File

@@ -23,10 +23,10 @@ class Clio(ConanFile):
'boost/1.82.0',
'cassandra-cpp-driver/2.17.0',
'fmt/10.1.1',
'protobuf/3.21.12',
'protobuf/3.21.9',
'grpc/1.50.1',
'openssl/1.1.1u',
'xrpl/2.1.0',
'xrpl/2.2.0-rc3',
'libbacktrace/cci.20210118'
]

View File

@@ -434,12 +434,12 @@ TEST_F(BackendCassandraTest, Basic)
auto allTransactions = backend->fetchAllTransactionsInLedger(lgrInfoNext.seq, yield);
ASSERT_EQ(allTransactions.size(), 1);
EXPECT_STREQ(
reinterpret_cast<const char*>(allTransactions[0].transaction.data()),
static_cast<const char*>(txnBlob.data())
reinterpret_cast<char const*>(allTransactions[0].transaction.data()),
static_cast<char const*>(txnBlob.data())
);
EXPECT_STREQ(
reinterpret_cast<const char*>(allTransactions[0].metadata.data()),
static_cast<const char*>(metaBlob.data())
reinterpret_cast<char const*>(allTransactions[0].metadata.data()),
static_cast<char const*>(metaBlob.data())
);
auto hashes = backend->fetchAllTransactionHashesInLedger(lgrInfoNext.seq, yield);
EXPECT_EQ(hashes.size(), 1);
@@ -461,10 +461,10 @@ TEST_F(BackendCassandraTest, Basic)
EXPECT_TRUE(key256.parseHex(accountIndexHex));
auto obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq + 1, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoOld.seq - 1, yield);
EXPECT_FALSE(obj);
}
@@ -498,13 +498,13 @@ TEST_F(BackendCassandraTest, Basic)
EXPECT_TRUE(key256.parseHex(accountIndexHex));
auto obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq + 1, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq - 1, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlobOld.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlobOld.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoOld.seq - 1, yield);
EXPECT_FALSE(obj);
}
@@ -540,7 +540,7 @@ TEST_F(BackendCassandraTest, Basic)
EXPECT_FALSE(obj);
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq - 2, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlobOld.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlobOld.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoOld.seq - 1, yield);
EXPECT_FALSE(obj);
}
@@ -552,7 +552,7 @@ TEST_F(BackendCassandraTest, Basic)
for (auto& blob : res) {
++key;
std::string const keyStr{reinterpret_cast<const char*>(key.data()), ripple::uint256::size()};
std::string const keyStr{reinterpret_cast<char const*>(key.data()), ripple::uint256::size()};
blob.first = keyStr;
blob.second = std::to_string(ledgerSequence) + keyStr;
}
@@ -570,7 +570,7 @@ TEST_F(BackendCassandraTest, Basic)
base = ledgerSequence * 100000ul;
for (auto& blob : res) {
++base;
std::string const hashStr{reinterpret_cast<const char*>(base.data()), ripple::uint256::size()};
std::string const hashStr{reinterpret_cast<char const*>(base.data()), ripple::uint256::size()};
std::string const txnStr = "tx" + std::to_string(ledgerSequence) + hashStr;
std::string const metaStr = "meta" + std::to_string(ledgerSequence) + hashStr;
blob = std::make_tuple(hashStr, txnStr, metaStr);
@@ -670,13 +670,13 @@ TEST_F(BackendCassandraTest, Basic)
bool found = false;
for (auto [retTxn, retMeta, retSeq, retDate] : retTxns) {
if (std::strncmp(
reinterpret_cast<const char*>(retTxn.data()),
static_cast<const char*>(txn.data()),
reinterpret_cast<char const*>(retTxn.data()),
static_cast<char const*>(txn.data()),
txn.size()
) == 0 &&
std::strncmp(
reinterpret_cast<const char*>(retMeta.data()),
static_cast<const char*>(meta.data()),
reinterpret_cast<char const*>(retMeta.data()),
static_cast<char const*>(meta.data()),
meta.size()
) == 0)
found = true;
@@ -699,8 +699,8 @@ TEST_F(BackendCassandraTest, Basic)
for (size_t i = 0; i < retData.size(); ++i) {
auto [txn, meta, _, _2] = retData[i];
auto [_3, expTxn, expMeta] = data[i];
EXPECT_STREQ(reinterpret_cast<const char*>(txn.data()), static_cast<const char*>(expTxn.data()));
EXPECT_STREQ(reinterpret_cast<const char*>(meta.data()), static_cast<const char*>(expMeta.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(txn.data()), static_cast<char const*>(expTxn.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(meta.data()), static_cast<char const*>(expMeta.data()));
}
}
std::vector<ripple::uint256> keys;
@@ -708,7 +708,7 @@ TEST_F(BackendCassandraTest, Basic)
auto retObj = backend->fetchLedgerObject(binaryStringToUint256(key), seq, yield);
if (obj.size()) {
ASSERT_TRUE(retObj.has_value());
EXPECT_STREQ(static_cast<const char*>(obj.data()), reinterpret_cast<const char*>(retObj->data()));
EXPECT_STREQ(static_cast<char const*>(obj.data()), reinterpret_cast<char const*>(retObj->data()));
} else {
ASSERT_FALSE(retObj.has_value());
}
@@ -725,7 +725,7 @@ TEST_F(BackendCassandraTest, Basic)
if (obj.size()) {
ASSERT_TRUE(retObj.size());
EXPECT_STREQ(
static_cast<const char*>(obj.data()), reinterpret_cast<const char*>(retObj.data())
static_cast<char const*>(obj.data()), reinterpret_cast<char const*>(retObj.data())
);
} else {
ASSERT_FALSE(retObj.size());
@@ -741,9 +741,9 @@ TEST_F(BackendCassandraTest, Basic)
retObjs.insert(retObjs.end(), page.objects.begin(), page.objects.end());
} while (page.cursor);
for (const auto& obj : objs) {
for (auto const& obj : objs) {
bool found = false;
for (const auto& retObj : retObjs) {
for (auto const& retObj : retObjs) {
if (ripple::strHex(obj.first) == ripple::strHex(retObj.key)) {
found = true;
ASSERT_EQ(ripple::strHex(obj.second), ripple::strHex(retObj.blob));
@@ -767,7 +767,7 @@ TEST_F(BackendCassandraTest, Basic)
for (auto rec : accountTx) {
for (auto account : rec.accounts) {
allAccountTx[lgrInfoNext.seq][account].emplace_back(
reinterpret_cast<const char*>(rec.txHash.data()), ripple::uint256::size()
reinterpret_cast<char const*>(rec.txHash.data()), ripple::uint256::size()
);
}
}
@@ -798,7 +798,7 @@ TEST_F(BackendCassandraTest, Basic)
for (auto rec : accountTx) {
for (auto account : rec.accounts) {
allAccountTx[lgrInfoNext.seq][account].emplace_back(
reinterpret_cast<const char*>(rec.txHash.data()), ripple::uint256::size()
reinterpret_cast<char const*>(rec.txHash.data()), ripple::uint256::size()
);
}
}
@@ -988,10 +988,10 @@ TEST_F(BackendCassandraTest, CacheIntegration)
EXPECT_TRUE(key256.parseHex(accountIndexHex));
auto obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq + 1, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoOld.seq - 1, yield);
EXPECT_FALSE(obj);
}
@@ -1024,13 +1024,13 @@ TEST_F(BackendCassandraTest, CacheIntegration)
EXPECT_TRUE(key256.parseHex(accountIndexHex));
auto obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq + 1, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlob.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlob.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq - 1, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlobOld.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlobOld.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoOld.seq - 1, yield);
EXPECT_FALSE(obj);
}
@@ -1066,7 +1066,7 @@ TEST_F(BackendCassandraTest, CacheIntegration)
EXPECT_FALSE(obj);
obj = backend->fetchLedgerObject(key256, lgrInfoNext.seq - 2, yield);
EXPECT_TRUE(obj);
EXPECT_STREQ(reinterpret_cast<const char*>(obj->data()), static_cast<const char*>(accountBlobOld.data()));
EXPECT_STREQ(reinterpret_cast<char const*>(obj->data()), static_cast<char const*>(accountBlobOld.data()));
obj = backend->fetchLedgerObject(key256, lgrInfoOld.seq - 1, yield);
EXPECT_FALSE(obj);
}
@@ -1078,7 +1078,7 @@ TEST_F(BackendCassandraTest, CacheIntegration)
for (auto& blob : res) {
++key;
std::string const keyStr{reinterpret_cast<const char*>(key.data()), ripple::uint256::size()};
std::string const keyStr{reinterpret_cast<char const*>(key.data()), ripple::uint256::size()};
blob.first = keyStr;
blob.second = std::to_string(ledgerSequence) + keyStr;
}
@@ -1158,7 +1158,7 @@ TEST_F(BackendCassandraTest, CacheIntegration)
auto retObj = backend->fetchLedgerObject(binaryStringToUint256(key), seq, yield);
if (obj.size()) {
ASSERT_TRUE(retObj.has_value());
EXPECT_STREQ(static_cast<const char*>(obj.data()), reinterpret_cast<const char*>(retObj->data()));
EXPECT_STREQ(static_cast<char const*>(obj.data()), reinterpret_cast<char const*>(retObj->data()));
} else {
ASSERT_FALSE(retObj.has_value());
}
@@ -1175,7 +1175,7 @@ TEST_F(BackendCassandraTest, CacheIntegration)
if (obj.size()) {
ASSERT_TRUE(retObj.size());
EXPECT_STREQ(
static_cast<const char*>(obj.data()), reinterpret_cast<const char*>(retObj.data())
static_cast<char const*>(obj.data()), reinterpret_cast<char const*>(retObj.data())
);
} else {
ASSERT_FALSE(retObj.size());
@@ -1189,9 +1189,9 @@ TEST_F(BackendCassandraTest, CacheIntegration)
page = backend->fetchLedgerPage(page.cursor, seq, limit, false, yield);
retObjs.insert(retObjs.end(), page.objects.begin(), page.objects.end());
} while (page.cursor);
for (const auto& obj : objs) {
for (auto const& obj : objs) {
bool found = false;
for (const auto& retObj : retObjs) {
for (auto const& retObj : retObjs) {
if (ripple::strHex(obj.first) == ripple::strHex(retObj.key)) {
found = true;
ASSERT_EQ(ripple::strHex(obj.second), ripple::strHex(retObj.blob));

View File

@@ -507,7 +507,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexSpecificForwardTrue)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -550,7 +550,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexSpecificForwardFalse)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -593,7 +593,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexNotSpecificForwardTrue)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -636,7 +636,7 @@ TEST_F(RPCAccountTxHandlerTest, IndexNotSpecificForwardFalse)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -679,7 +679,7 @@ TEST_F(RPCAccountTxHandlerTest, BinaryTrue)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -735,7 +735,7 @@ TEST_F(RPCAccountTxHandlerTest, BinaryTrueV2)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -788,7 +788,7 @@ TEST_F(RPCAccountTxHandlerTest, LimitAndMarker)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -838,7 +838,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificLedgerIndex)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index": {}
@@ -866,7 +866,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificNonexistLedgerIntIndex)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index": {}
@@ -891,7 +891,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificNonexistLedgerStringIndex)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index": "{}"
@@ -933,7 +933,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificLedgerHash)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_hash": "{}"
@@ -978,7 +978,7 @@ TEST_F(RPCAccountTxHandlerTest, SpecificLedgerIndexValidated)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index": "validated"
@@ -1017,7 +1017,7 @@ TEST_F(RPCAccountTxHandlerTest, TxLessThanMinSeq)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -1060,7 +1060,7 @@ TEST_F(RPCAccountTxHandlerTest, TxLargerThanMaxSeq)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -1295,7 +1295,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v1)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},
@@ -1537,7 +1537,7 @@ TEST_F(RPCAccountTxHandlerTest, NFTTxs_API_v2)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{AccountTxHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"account": "{}",
"ledger_index_min": {},

View File

@@ -292,7 +292,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardTrue)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -437,7 +437,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV1)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -592,7 +592,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexSpecificForwardFalseV2)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -626,7 +626,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexNotSpecificForwardTrue)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -669,7 +669,7 @@ TEST_F(RPCNFTHistoryHandlerTest, IndexNotSpecificForwardFalse)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -712,7 +712,7 @@ TEST_F(RPCNFTHistoryHandlerTest, BinaryTrueV1)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -768,7 +768,7 @@ TEST_F(RPCNFTHistoryHandlerTest, BinaryTrueV2)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -821,7 +821,7 @@ TEST_F(RPCNFTHistoryHandlerTest, LimitAndMarker)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -871,7 +871,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificLedgerIndex)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index":{}
@@ -899,7 +899,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificNonexistLedgerIntIndex)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index":{}
@@ -924,7 +924,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificNonexistLedgerStringIndex)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index":"{}"
@@ -966,7 +966,7 @@ TEST_F(RPCNFTHistoryHandlerTest, SpecificLedgerHash)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_hash":"{}"
@@ -1006,7 +1006,7 @@ TEST_F(RPCNFTHistoryHandlerTest, TxLessThanMinSeq)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -1049,7 +1049,7 @@ TEST_F(RPCNFTHistoryHandlerTest, TxLargerThanMaxSeq)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},
@@ -1092,7 +1092,7 @@ TEST_F(RPCNFTHistoryHandlerTest, LimitMoreThanMax)
runSpawn([&, this](auto yield) {
auto const handler = AnyHandler{NFTHistoryHandler{backend}};
auto const static input = json::parse(fmt::format(
auto static const input = json::parse(fmt::format(
R"({{
"nft_id":"{}",
"ledger_index_min": {},

View File

@@ -699,7 +699,7 @@ TEST_F(RPCTxTest, NFTCancelOffer)
for (auto const& id : output->at("meta").at("nftoken_ids").as_array()) {
auto const idStr = id.as_string();
const auto it = std::find(ids.begin(), ids.end(), idStr);
auto const it = std::find(ids.begin(), ids.end(), idStr);
ASSERT_NE(it, ids.end()) << "Unexpected NFT ID: " << idStr;
ids.erase(it);
}