[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

@@ -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));
}
}