Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrippled committed Nov 27, 2023
1 parent a21de08 commit 5cd8765
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/ripple/app/consensus/RCLConsensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,13 @@ class RCLConsensus
void
dispose(T&& garbage)
{
app_.getJobQueue().addJob(jtGARBAGE, "disposeGarbage",
[g = std::move(garbage)]() {
static_assert(std::is_rvalue_reference_v<decltype(garbage)>);
app_.getJobQueue().addJob(
jtGARBAGE, "disposeGarbage", [g = std::move(garbage)]() {
static_assert(
std::is_rvalue_reference_v<decltype(garbage)>);
// Postpone the destruction of the contents of g until
// the closure's destructor runs on the job queue.
});
});
}

private:
Expand Down
6 changes: 4 additions & 2 deletions src/ripple/consensus/Consensus.h
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ Consensus<Adaptor>::startRoundInternal(
// catch up quickly from extended de-sync periods.
{
std::vector<TxSet_t> garbage;
auto const expired(std::chrono::steady_clock::now() - std::chrono::minutes(30));
auto const expired(
std::chrono::steady_clock::now() - std::chrono::minutes(30));
for (auto iter(acquired_.chronological.cbegin());
iter != acquired_.chronological.cend() && iter.when() <= expired;)
{
Expand Down Expand Up @@ -932,7 +933,8 @@ Consensus<Adaptor>::peerProposalInternal(
// the tx set is remembered for future destruction.
newPeerPos.proposal().arrivalTime() =
peerPosIt->second.proposal().arrivalTime();
auto found = acquired_.find(peerPosIt->second.proposal().position());
auto found =
acquired_.find(peerPosIt->second.proposal().position());
if (found != acquired_.end())
acquiredGarbage_.push_back(found->first);
peerPosIt->second = newPeerPos;
Expand Down

0 comments on commit 5cd8765

Please sign in to comment.