[CI] clang-tidy auto fixes (#1385)

Fixes #1384. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <kuznetsss@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-04-30 12:39:35 +01:00
committed by GitHub
parent b8cb60b7db
commit 8f47128424
28 changed files with 153 additions and 279 deletions

View File

@@ -39,39 +39,17 @@ namespace data {
template <typename T>
concept SomeBackendCounters = requires(T a) {
typename T::PtrType;
{
a.registerTooBusy()
} -> std::same_as<void>;
{
a.registerWriteSync(std::chrono::steady_clock::time_point{})
} -> std::same_as<void>;
{
a.registerWriteSyncRetry()
} -> std::same_as<void>;
{
a.registerWriteStarted()
} -> std::same_as<void>;
{
a.registerWriteFinished(std::chrono::steady_clock::time_point{})
} -> std::same_as<void>;
{
a.registerWriteRetry()
} -> std::same_as<void>;
{
a.registerReadStarted(std::uint64_t{})
} -> std::same_as<void>;
{
a.registerReadFinished(std::chrono::steady_clock::time_point{}, std::uint64_t{})
} -> std::same_as<void>;
{
a.registerReadRetry(std::uint64_t{})
} -> std::same_as<void>;
{
a.registerReadError(std::uint64_t{})
} -> std::same_as<void>;
{
a.report()
} -> std::same_as<boost::json::object>;
{ a.registerTooBusy() } -> std::same_as<void>;
{ a.registerWriteSync(std::chrono::steady_clock::time_point{}) } -> std::same_as<void>;
{ a.registerWriteSyncRetry() } -> std::same_as<void>;
{ a.registerWriteStarted() } -> std::same_as<void>;
{ a.registerWriteFinished(std::chrono::steady_clock::time_point{}) } -> std::same_as<void>;
{ a.registerWriteRetry() } -> std::same_as<void>;
{ a.registerReadStarted(std::uint64_t{}) } -> std::same_as<void>;
{ a.registerReadFinished(std::chrono::steady_clock::time_point{}, std::uint64_t{}) } -> std::same_as<void>;
{ a.registerReadRetry(std::uint64_t{}) } -> std::same_as<void>;
{ a.registerReadError(std::uint64_t{}) } -> std::same_as<void>;
{ a.report() } -> std::same_as<boost::json::object>;
};
/**

View File

@@ -235,8 +235,7 @@ BackendInterface::fetchBookOffers(
LOG(gLog.debug()) << "Fetching " << std::to_string(keys.size()) << " offers took "
<< std::to_string(getMillis(mid - begin)) << " milliseconds. Fetching next dir took "
<< std::to_string(succMillis) << " milliseonds. Fetched next dir " << std::to_string(numSucc)
<< " times"
<< " Fetching next page of dir took " << std::to_string(pageMillis) << " milliseconds"
<< " times" << " Fetching next page of dir took " << std::to_string(pageMillis) << " milliseconds"
<< ". num pages = " << std::to_string(numPages) << ". Fetching all objects took "
<< std::to_string(getMillis(end - mid))
<< " milliseconds. total time = " << std::to_string(getMillis(end - begin)) << " milliseconds"

View File

@@ -777,9 +777,7 @@ public:
std::cend(keys),
std::cbegin(objs),
std::back_inserter(results),
[](auto const& key, auto const& obj) {
return LedgerObject{key, obj};
}
[](auto const& key, auto const& obj) { return LedgerObject{key, obj}; }
);
return results;
@@ -799,8 +797,8 @@ public:
void
writeSuccessor(std::string&& key, std::uint32_t const seq, std::string&& successor) override
{
LOG(log_.trace()) << "Writing successor. key = " << key.size() << " bytes. "
<< " seq = " << std::to_string(seq) << " successor = " << successor.size() << " bytes.";
LOG(log_.trace()) << "Writing successor. key = " << key.size() << " bytes. " << " seq = " << std::to_string(seq)
<< " successor = " << successor.size() << " bytes.";
ASSERT(!key.empty(), "Key must not be empty");
ASSERT(!successor.empty(), "Successor must not be empty");

View File

@@ -41,18 +41,10 @@ namespace data::cassandra {
*/
template <typename T>
concept SomeSettingsProvider = requires(T a) {
{
a.getSettings()
} -> std::same_as<Settings>;
{
a.getKeyspace()
} -> std::same_as<std::string>;
{
a.getTablePrefix()
} -> std::same_as<std::optional<std::string>>;
{
a.getReplicationFactor()
} -> std::same_as<uint16_t>;
{ a.getSettings() } -> std::same_as<Settings>;
{ a.getKeyspace() } -> std::same_as<std::string>;
{ a.getTablePrefix() } -> std::same_as<std::optional<std::string>>;
{ a.getReplicationFactor() } -> std::same_as<uint16_t>;
};
/**
@@ -68,42 +60,18 @@ concept SomeExecutionStrategy = requires(
PreparedStatement prepared,
boost::asio::yield_context token
) {
{
T(settings, handle)
};
{
a.sync()
} -> std::same_as<void>;
{
a.isTooBusy()
} -> std::same_as<bool>;
{
a.writeSync(statement)
} -> std::same_as<ResultOrError>;
{
a.writeSync(prepared)
} -> std::same_as<ResultOrError>;
{
a.write(prepared)
} -> std::same_as<void>;
{
a.write(std::move(statements))
} -> std::same_as<void>;
{
a.read(token, prepared)
} -> std::same_as<ResultOrError>;
{
a.read(token, statement)
} -> std::same_as<ResultOrError>;
{
a.read(token, statements)
} -> std::same_as<ResultOrError>;
{
a.readEach(token, statements)
} -> std::same_as<std::vector<Result>>;
{
a.stats()
} -> std::same_as<boost::json::object>;
{ T(settings, handle) };
{ a.sync() } -> std::same_as<void>;
{ a.isTooBusy() } -> std::same_as<bool>;
{ a.writeSync(statement) } -> std::same_as<ResultOrError>;
{ a.writeSync(prepared) } -> std::same_as<ResultOrError>;
{ a.write(prepared) } -> std::same_as<void>;
{ a.write(std::move(statements)) } -> std::same_as<void>;
{ a.read(token, prepared) } -> std::same_as<ResultOrError>;
{ a.read(token, statement) } -> std::same_as<ResultOrError>;
{ a.read(token, statements) } -> std::same_as<ResultOrError>;
{ a.readEach(token, statements) } -> std::same_as<std::vector<Result>>;
{ a.stats() } -> std::same_as<boost::json::object>;
};
/**
@@ -111,12 +79,8 @@ concept SomeExecutionStrategy = requires(
*/
template <typename T>
concept SomeRetryPolicy = requires(T a, boost::asio::io_context ioc, CassandraError err, uint32_t attempt) {
{
T(ioc)
};
{
a.shouldRetry(err)
} -> std::same_as<bool>;
{ T(ioc) };
{ a.shouldRetry(err) } -> std::same_as<bool>;
{
a.retry([]() {})
} -> std::same_as<void>;

View File

@@ -484,8 +484,7 @@ private:
{
std::unique_lock<std::mutex> lck(throttleMutex_);
if (!canAddWriteRequest()) {
LOG(log_.trace()) << "Max outstanding requests reached. "
<< "Waiting for other requests to finish";
LOG(log_.trace()) << "Max outstanding requests reached. " << "Waiting for other requests to finish";
throttleCv_.wait(lck, [this]() { return canAddWriteRequest(); });
}
}

View File

@@ -121,7 +121,8 @@ public:
// reinterpret_cast is needed here :'(
auto const rc = bindBytes(reinterpret_cast<unsigned char const*>(value.data()), value.size());
throwErrorIfNeeded(rc, "Bind string (as bytes)");
} else if constexpr (std::is_same_v<DecayedType, UintTupleType> || std::is_same_v<DecayedType, UintByteTupleType>) {
} else if constexpr (std::is_same_v<DecayedType, UintTupleType> ||
std::is_same_v<DecayedType, UintByteTupleType>) {
auto const rc = cass_statement_bind_tuple(*this, idx, Tuple{std::forward<Type>(value)});
throwErrorIfNeeded(rc, "Bind tuple<uint32, uint32> or <uint32_t, ripple::uint256>");
} else if constexpr (std::is_same_v<DecayedType, ByteVectorType>) {

View File

@@ -152,8 +152,7 @@ ETLService::monitor()
ASSERT(rng.has_value(), "Ledger range can't be null");
uint32_t nextSequence = rng->maxSequence + 1;
LOG(log_.debug()) << "Database is populated. "
<< "Starting monitor loop. sequence = " << nextSequence;
LOG(log_.debug()) << "Database is populated. " << "Starting monitor loop. sequence = " << nextSequence;
while (not isStopping()) {
nextSequence = publishNextSequence(nextSequence);

View File

@@ -120,7 +120,8 @@ LoadBalancer::LoadBalancer(
"Failed to fetch ETL state from source = {} Please check the configuration and network",
source.toString()
));
} else if (etlState_ && etlState_->networkID && stateOpt->networkID && etlState_->networkID != stateOpt->networkID) {
} else if (etlState_ && etlState_->networkID && stateOpt->networkID &&
etlState_->networkID != stateOpt->networkID) {
checkOnETLFailure(fmt::format(
"ETL sources must be on the same network. Source network id = {} does not match others network id = {}",
*(stateOpt->networkID),
@@ -158,8 +159,8 @@ LoadBalancer::loadInitialLedger(uint32_t sequence, bool cacheOnly)
auto [data, res] = source.loadInitialLedger(sequence, downloadRanges_, cacheOnly);
if (!res) {
LOG(log_.error()) << "Failed to download initial ledger."
<< " Sequence = " << sequence << " source = " << source.toString();
LOG(log_.error()) << "Failed to download initial ledger." << " Sequence = " << sequence
<< " source = " << source.toString();
} else {
response = std::move(data);
}
@@ -281,8 +282,7 @@ LoadBalancer::execute(Func f, uint32_t ledgerSequence)
numAttempts++;
if (numAttempts % sources_.size() == 0) {
LOG(log_.info()) << "Ledger sequence " << ledgerSequence
<< " is not yet available from any configured sources. "
<< "Sleeping and trying again";
<< " is not yet available from any configured sources. " << "Sleeping and trying again";
std::this_thread::sleep_for(std::chrono::seconds(2));
}
}

View File

@@ -99,15 +99,14 @@ public:
bool cacheOnly = false
)
{
LOG(log_.trace()) << "Processing response. "
<< "Marker prefix = " << getMarkerPrefix();
LOG(log_.trace()) << "Processing response. " << "Marker prefix = " << getMarkerPrefix();
if (abort) {
LOG(log_.error()) << "AsyncCallData aborted";
return CallStatus::ERRORED;
}
if (!status_.ok()) {
LOG(log_.error()) << "AsyncCallData status_ not ok: "
<< " code = " << status_.error_code() << " message = " << status_.error_message();
LOG(log_.error()) << "AsyncCallData status_ not ok: " << " code = " << status_.error_code()
<< " message = " << status_.error_message();
return CallStatus::ERRORED;
}
if (!next_->is_unlimited()) {

View File

@@ -72,9 +72,7 @@ public:
std::prev(std::end(cursors)),
std::next(std::begin(cursors)),
std::back_inserter(pairs),
[](auto&& a, auto&& b) -> CursorPair {
return {a, b};
}
[](auto&& a, auto&& b) -> CursorPair { return {a, b}; }
);
return pairs;

View File

@@ -99,9 +99,7 @@ public:
std::prev(std::end(cursors)),
std::next(std::begin(cursors)),
std::back_inserter(pairs),
[](auto&& a, auto&& b) -> CursorPair {
return {a, b};
}
[](auto&& a, auto&& b) -> CursorPair { return {a, b}; }
);
return pairs;

View File

@@ -95,9 +95,7 @@ public:
std::prev(std::end(cursors)),
std::next(std::begin(cursors)),
std::back_inserter(pairs),
[](auto&& a, auto&& b) -> CursorPair {
return {a, b};
}
[](auto&& a, auto&& b) -> CursorPair { return {a, b}; }
);
return pairs;

View File

@@ -127,8 +127,7 @@ GrpcSource::loadInitialLedger(uint32_t const sequence, uint32_t const numMarkers
auto result = ptr->process(stub_, cq, *backend_, abort, cacheOnly);
if (result != etl::impl::AsyncCallData::CallStatus::MORE) {
++numFinished;
LOG(log_.debug()) << "Finished a marker. "
<< "Current number of finished = " << numFinished;
LOG(log_.debug()) << "Finished a marker. " << "Current number of finished = " << numFinished;
if (auto lastKey = ptr->getLastKey(); !lastKey.empty())
edgeKeys.push_back(std::move(lastKey));

View File

@@ -158,10 +158,10 @@ private:
auto const end = std::chrono::system_clock::now();
auto const duration = ((end - start).count()) / 1000000000.0;
LOG(log_.info()) << "Load phase of etl : "
<< "Successfully wrote ledger! Ledger info: " << util::toString(lgrInfo)
<< ". txn count = " << numTxns << ". object count = " << numObjects
<< ". load time = " << duration << ". load txns per second = " << numTxns / duration
LOG(log_.info()) << "Load phase of etl : " << "Successfully wrote ledger! Ledger info: "
<< util::toString(lgrInfo) << ". txn count = " << numTxns
<< ". object count = " << numObjects << ". load time = " << duration
<< ". load txns per second = " << numTxns / duration
<< ". load objs per second = " << numObjects / duration;
// success is false if the ledger was already written

View File

@@ -33,9 +33,7 @@ namespace feed::impl {
template <typename T>
concept Hashable = requires(T a) {
{
std::hash<T>{}(a)
} -> std::convertible_to<std::size_t>;
{ std::hash<T>{}(a) } -> std::convertible_to<std::size_t>;
};
/**

View File

@@ -84,7 +84,7 @@ struct Status {
*
* @param code The error code
*/
/* implicit */ Status(CombinedError code) : code(code){};
/* implicit */ Status(CombinedError code) : code(code) {};
/**
* @brief Construct a new Status object
@@ -92,7 +92,7 @@ struct Status {
* @param code The error code
* @param extraInfo The extra info
*/
Status(CombinedError code, boost::json::object&& extraInfo) : code(code), extraInfo(std::move(extraInfo)){};
Status(CombinedError code, boost::json::object&& extraInfo) : code(code), extraInfo(std::move(extraInfo)) {};
/**
* @brief Construct a new Status object with a custom message

View File

@@ -40,9 +40,7 @@ struct RpcSpec;
*/
template <typename T>
concept SomeRequirement = requires(T a, boost::json::value lval) {
{
a.verify(lval, std::string{})
} -> std::same_as<MaybeError>;
{ a.verify(lval, std::string{}) } -> std::same_as<MaybeError>;
};
/**
@@ -50,9 +48,7 @@ concept SomeRequirement = requires(T a, boost::json::value lval) {
*/
template <typename T>
concept SomeModifier = requires(T a, boost::json::value lval) {
{
a.modify(lval, std::string{})
} -> std::same_as<MaybeError>;
{ a.modify(lval, std::string{}) } -> std::same_as<MaybeError>;
};
/**
@@ -60,9 +56,7 @@ concept SomeModifier = requires(T a, boost::json::value lval) {
*/
template <typename T>
concept SomeCheck = requires(T a, boost::json::value lval) {
{
a.check(lval, std::string{})
} -> std::same_as<std::optional<check::Warning>>;
{ a.check(lval, std::string{}) } -> std::same_as<std::optional<check::Warning>>;
};
/**
@@ -76,9 +70,7 @@ concept SomeProcessor = (SomeRequirement<T> or SomeModifier<T>);
*/
template <typename T>
concept SomeContextProcessWithInput = requires(T a, typename T::Input in, typename T::Output out, Context const& ctx) {
{
a.process(in, ctx)
} -> std::same_as<HandlerReturnType<decltype(out)>>;
{ a.process(in, ctx) } -> std::same_as<HandlerReturnType<decltype(out)>>;
};
/**
@@ -86,9 +78,7 @@ concept SomeContextProcessWithInput = requires(T a, typename T::Input in, typena
*/
template <typename T>
concept SomeContextProcessWithoutInput = requires(T a, typename T::Output out, Context const& ctx) {
{
a.process(ctx)
} -> std::same_as<HandlerReturnType<decltype(out)>>;
{ a.process(ctx) } -> std::same_as<HandlerReturnType<decltype(out)>>;
};
/**
@@ -96,9 +86,7 @@ concept SomeContextProcessWithoutInput = requires(T a, typename T::Output out, C
*/
template <typename T>
concept SomeHandlerWithInput = requires(T a, uint32_t version) {
{
a.spec(version)
} -> std::same_as<RpcSpec const&>;
{ a.spec(version) } -> std::same_as<RpcSpec const&>;
} and SomeContextProcessWithInput<T> and boost::json::has_value_to<typename T::Input>::value;
/**
@@ -112,6 +100,6 @@ concept SomeHandlerWithoutInput = SomeContextProcessWithoutInput<T>;
*/
template <typename T>
concept SomeHandler =
(SomeHandlerWithInput<T> or SomeHandlerWithoutInput<T>)and boost::json::has_value_from<typename T::Output>::value;
(SomeHandlerWithInput<T> or SomeHandlerWithoutInput<T>) and boost::json::has_value_from<typename T::Output>::value;
} // namespace rpc

View File

@@ -32,9 +32,7 @@ namespace util::async {
*/
template <typename T>
concept SomeStoppable = requires(T v) {
{
v.requestStop()
} -> std::same_as<void>;
{ v.requestStop() } -> std::same_as<void>;
};
/**
@@ -42,9 +40,7 @@ concept SomeStoppable = requires(T v) {
*/
template <typename T>
concept SomeCancellable = requires(T v) {
{
v.cancel()
} -> std::same_as<void>;
{ v.cancel() } -> std::same_as<void>;
};
/**
@@ -52,12 +48,8 @@ concept SomeCancellable = requires(T v) {
*/
template <typename T>
concept SomeOperation = requires(T v) {
{
v.wait()
} -> std::same_as<void>;
{
v.get()
};
{ v.wait() } -> std::same_as<void>;
{ v.get() };
};
/**
@@ -77,9 +69,7 @@ concept SomeCancellableOperation = SomeOperation<T> and SomeCancellable<T>;
*/
template <typename T>
concept SomeOutcome = requires(T v) {
{
v.getOperation()
} -> SomeOperation;
{ v.getOperation() } -> SomeOperation;
};
/**
@@ -87,9 +77,7 @@ concept SomeOutcome = requires(T v) {
*/
template <typename T>
concept SomeStopToken = requires(T v) {
{
v.isStopRequested()
} -> std::same_as<bool>;
{ v.isStopRequested() } -> std::same_as<bool>;
};
/**
@@ -97,9 +85,7 @@ concept SomeStopToken = requires(T v) {
*/
template <typename T>
concept SomeYieldStopSource = requires(T v, boost::asio::yield_context yield) {
{
v[yield]
} -> SomeStopToken;
{ v[yield] } -> SomeStopToken;
};
/**
@@ -107,25 +93,21 @@ concept SomeYieldStopSource = requires(T v, boost::asio::yield_context yield) {
*/
template <typename T>
concept SomeSimpleStopSource = requires(T v) {
{
v.getToken()
} -> SomeStopToken;
{ v.getToken() } -> SomeStopToken;
};
/**
* @brief Specifies the interface for a stop source
*/
template <typename T>
concept SomeStopSource = (SomeSimpleStopSource<T> or SomeYieldStopSource<T>)and SomeStoppable<T>;
concept SomeStopSource = (SomeSimpleStopSource<T> or SomeYieldStopSource<T>) and SomeStoppable<T>;
/**
* @brief Specifies the interface for a provider of stop sources
*/
template <typename T>
concept SomeStopSourceProvider = requires(T v) {
{
v.getStopSource()
} -> SomeStopSource;
{ v.getStopSource() } -> SomeStopSource;
};
/**
@@ -139,9 +121,7 @@ concept SomeStoppableOutcome = SomeOutcome<T> and SomeStopSourceProvider<T>;
*/
template <typename T>
concept SomeHandlerWithoutStopToken = requires(T fn) {
{
std::invoke(fn)
};
{ std::invoke(fn) };
};
/**
@@ -149,9 +129,7 @@ concept SomeHandlerWithoutStopToken = requires(T fn) {
*/
template <typename T, typename... Args>
concept SomeHandlerWith = requires(T fn) {
{
std::invoke(fn, std::declval<Args>()...)
};
{ std::invoke(fn, std::declval<Args>()...) };
};
/**

View File

@@ -29,12 +29,8 @@ namespace util::prometheus {
template <typename T>
concept SomeBoolImpl = requires(T a) {
{
a.set(0)
} -> std::same_as<void>;
{
a.value()
} -> std::same_as<int64_t>;
{ a.set(0) } -> std::same_as<void>;
{ a.value() } -> std::same_as<int64_t>;
};
/**

View File

@@ -29,15 +29,9 @@ template <typename T>
concept SomeCounterImpl = requires(T a) {
typename std::remove_cvref_t<T>::ValueType;
requires SomeNumberType<typename std::remove_cvref_t<T>::ValueType>;
{
a.add(typename std::remove_cvref_t<T>::ValueType{1})
} -> std::same_as<void>;
{
a.set(typename std::remove_cvref_t<T>::ValueType{1})
} -> std::same_as<void>;
{
a.value()
} -> SomeNumberType;
{ a.add(typename std::remove_cvref_t<T>::ValueType{1}) } -> std::same_as<void>;
{ a.set(typename std::remove_cvref_t<T>::ValueType{1}) } -> std::same_as<void>;
{ a.value() } -> SomeNumberType;
};
template <SomeNumberType NumberType>

View File

@@ -38,15 +38,9 @@ template <typename T>
concept SomeHistogramImpl = requires(T t) {
typename std::remove_cvref_t<T>::ValueType;
requires SomeNumberType<typename std::remove_cvref_t<T>::ValueType>;
{
t.observe(typename std::remove_cvref_t<T>::ValueType{1})
} -> std::same_as<void>;
{
t.setBuckets(std::vector<typename std::remove_cvref_t<T>::ValueType>{})
} -> std::same_as<void>;
{
t.serializeValue(std::string{}, std::string{}, std::declval<OStream&>())
} -> std::same_as<void>;
{ t.observe(typename std::remove_cvref_t<T>::ValueType{1}) } -> std::same_as<void>;
{ t.setBuckets(std::vector<typename std::remove_cvref_t<T>::ValueType>{}) } -> std::same_as<void>;
{ t.serializeValue(std::string{}, std::string{}, std::declval<OStream&>()) } -> std::same_as<void>;
};
template <SomeNumberType NumberType>

View File

@@ -36,9 +36,7 @@ namespace web {
template <typename T>
concept SomeResolver = requires(T t) {
std::is_default_constructible_v<T>;
{
t.resolve(std::string_view{}, std::string_view{})
} -> std::same_as<std::vector<std::string>>;
{ t.resolve(std::string_view{}, std::string_view{}) } -> std::same_as<std::vector<std::string>>;
};
/**

View File

@@ -36,9 +36,7 @@ template <typename T>
concept SomeServerHandler =
requires(T handler, std::string req, std::shared_ptr<ConnectionBase> ws, boost::beast::error_code ec) {
// the callback when server receives a request
{
handler(req, ws)
};
{ handler(req, ws) };
};
} // namespace web

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

@@ -106,7 +106,7 @@ struct MockHandle {
};
struct FakeRetryPolicy {
FakeRetryPolicy(boost::asio::io_context&){}; // required by concept
FakeRetryPolicy(boost::asio::io_context&) {}; // required by concept
static std::chrono::milliseconds
calculateDelay(uint32_t /* attempt */)

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.result->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);
}