mirror of
https://github.com/XRPLF/clio.git
synced 2026-07-30 02:20:28 +00:00
style: Set clang-format width 100 (#2953)
This commit is contained in:
@@ -37,7 +37,10 @@ std::atomic_int64_t ExampleObjectsMigrator::count;
|
||||
std::atomic_int64_t ExampleObjectsMigrator::accountCount;
|
||||
|
||||
void
|
||||
ExampleObjectsMigrator::runMigration(std::shared_ptr<Backend> const& backend, util::config::ObjectView const& config)
|
||||
ExampleObjectsMigrator::runMigration(
|
||||
std::shared_ptr<Backend> const& backend,
|
||||
util::config::ObjectView const& config
|
||||
)
|
||||
{
|
||||
auto const ctxFullScanThreads = config.get<std::uint32_t>("full_scan_threads");
|
||||
auto const jobsFullScan = config.get<std::uint32_t>("full_scan_jobs");
|
||||
@@ -45,18 +48,22 @@ ExampleObjectsMigrator::runMigration(std::shared_ptr<Backend> const& backend, ut
|
||||
|
||||
std::unordered_set<ripple::uint256> idx;
|
||||
migration::cassandra::impl::ObjectsScanner scanner(
|
||||
{.ctxThreadsNum = ctxFullScanThreads, .jobsNum = jobsFullScan, .cursorsPerJob = cursorPerJobsFullScan},
|
||||
migration::cassandra::impl::ObjectsAdapter(backend, [&](std::uint32_t, std::optional<ripple::SLE> sle) {
|
||||
if (sle.has_value()) {
|
||||
if (sle->getType() == ripple::ltACCOUNT_ROOT) {
|
||||
if (!idx.contains(sle->key())) {
|
||||
ExampleObjectsMigrator::accountCount++;
|
||||
{.ctxThreadsNum = ctxFullScanThreads,
|
||||
.jobsNum = jobsFullScan,
|
||||
.cursorsPerJob = cursorPerJobsFullScan},
|
||||
migration::cassandra::impl::ObjectsAdapter(
|
||||
backend, [&](std::uint32_t, std::optional<ripple::SLE> sle) {
|
||||
if (sle.has_value()) {
|
||||
if (sle->getType() == ripple::ltACCOUNT_ROOT) {
|
||||
if (!idx.contains(sle->key())) {
|
||||
ExampleObjectsMigrator::accountCount++;
|
||||
}
|
||||
}
|
||||
idx.insert(sle->key());
|
||||
ExampleObjectsMigrator::count++;
|
||||
}
|
||||
idx.insert(sle->key());
|
||||
ExampleObjectsMigrator::count++;
|
||||
}
|
||||
})
|
||||
)
|
||||
);
|
||||
scanner.wait();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user