mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-23 23:20:33 +00:00
fixing clang-tidy and auto formating
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <xrpl/beast/utility/Journal.h>
|
||||
#include <xrpl/beast/utility/instrumentation.h>
|
||||
#include <xrpl/json/json_value.h>
|
||||
#include <xrpl/json/json_writer.h>
|
||||
#include <xrpl/ledger/Ledger.h>
|
||||
#include <xrpl/ledger/ReadView.h>
|
||||
#include <xrpl/protocol/Protocol.h>
|
||||
@@ -34,7 +35,7 @@ LedgerHistory::LedgerHistory(beast::insight::Collector::ptr const& collector, Ap
|
||||
: app_(app)
|
||||
, collector_(collector)
|
||||
, mismatchCounter_(collector->makeCounter("ledger.history", "mismatch"))
|
||||
, mConsensusValidated_(
|
||||
, consensusValidated_(
|
||||
"ConsensusValidated",
|
||||
64,
|
||||
std::chrono::minutes{5},
|
||||
@@ -197,7 +198,7 @@ logMetadataDifference(
|
||||
auto builtMetaData = getMeta(builtLedger, tx);
|
||||
|
||||
XRPL_ASSERT(
|
||||
validMetaData || builtMetaData, "xrpl::log_metadata_difference : some metadata present");
|
||||
validMetaData || builtMetaData, "xrpl::logMetadataDifference : some metadata present");
|
||||
|
||||
if (validMetaData && builtMetaData)
|
||||
{
|
||||
@@ -274,7 +275,7 @@ logMetadataDifference(
|
||||
<< " Index: " << validMetaData->getIndex() << " Nodes:\n"
|
||||
<< validNodes.getJson(JsonOptions::Values::None);
|
||||
}
|
||||
else // nodes_diff
|
||||
else // nodesDiff
|
||||
{
|
||||
JLOG(j.debug()) << "MISMATCH on TX " << tx << ": Different nodes!";
|
||||
JLOG(j.debug()) << " Built:"
|
||||
@@ -444,7 +445,7 @@ LedgerHistory::builtLedger(
|
||||
};
|
||||
std::optional<MismatchInputs> mismatch;
|
||||
|
||||
mConsensusValidated_.fetchAndModify(index, [&](CvEntry& entry) {
|
||||
consensusValidated_.fetchAndModify(index, [&](CvEntry& entry) {
|
||||
if (entry.validated && !entry.built)
|
||||
{
|
||||
if (entry.validated.value() != hash)
|
||||
@@ -496,7 +497,7 @@ LedgerHistory::validatedLedger(
|
||||
};
|
||||
std::optional<MismatchInputs> mismatch;
|
||||
|
||||
mConsensusValidated_.fetchAndModify(index, [&](CvEntry& entry) {
|
||||
consensusValidated_.fetchAndModify(index, [&](CvEntry& entry) {
|
||||
if (entry.built && !entry.validated)
|
||||
{
|
||||
if (entry.built.value() != hash)
|
||||
@@ -530,7 +531,7 @@ LedgerHistory::validatedLedger(
|
||||
}
|
||||
}
|
||||
|
||||
/** Ensure m_ledgers_by_hash doesn't have the wrong hash for a particular index
|
||||
/** Ensure byHash doesn't have the wrong hash for a particular index
|
||||
*/
|
||||
bool
|
||||
LedgerHistory::fixIndex(LedgerIndex ledgerIndex, LedgerHash const& ledgerHash)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <xrpld/app/main/Application.h>
|
||||
|
||||
#include <xrpl/basics/Mutex.hpp>
|
||||
#include <xrpl/basics/TaggedCache.h>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
#include <xrpl/beast/insight/Collector.h>
|
||||
#include <xrpl/beast/insight/Counter.h>
|
||||
@@ -33,7 +34,7 @@ public:
|
||||
bool
|
||||
insert(std::shared_ptr<Ledger const> const& ledger, bool validated);
|
||||
|
||||
/** Get the ledgers_by_hash cache hit rate
|
||||
/** Get the byHash cache hit rate
|
||||
@return the hit rate
|
||||
*/
|
||||
float
|
||||
@@ -67,7 +68,7 @@ public:
|
||||
auto lock = ledgerMaps_.lock();
|
||||
lock->byHash->sweep();
|
||||
}
|
||||
mConsensusValidated_.sweep();
|
||||
consensusValidated_.sweep();
|
||||
}
|
||||
|
||||
/** Report that we have locally built a particular ledger */
|
||||
@@ -140,7 +141,7 @@ private:
|
||||
std::optional<json::Value> consensus;
|
||||
};
|
||||
using ConsensusValidated = TaggedCache<LedgerIndex, CvEntry>;
|
||||
ConsensusValidated mConsensusValidated_;
|
||||
ConsensusValidated consensusValidated_;
|
||||
|
||||
beast::Journal j_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user