mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-31 11:00:23 +00:00
refactor: Use explicit types to help compiler
This commit is contained in:
@@ -153,6 +153,7 @@ Checks: "-*,
|
||||
readability-use-std-min-max
|
||||
"
|
||||
# ---
|
||||
# bugprone-narrowing-conversions, # this will break a lot of code but we should enable it in the future because it can eliminate a lot of bugs
|
||||
# readability-inconsistent-declaration-parameter-name, # in this codebase this check will break a lot of arg names
|
||||
# readability-static-accessed-through-instance, # this check is probably unnecessary. it makes the code less readable
|
||||
# ---
|
||||
|
||||
@@ -2032,7 +2032,7 @@ PeerImp::checkTracking(std::uint32_t validationSeq)
|
||||
void
|
||||
PeerImp::checkTracking(std::uint32_t seq1, std::uint32_t seq2)
|
||||
{
|
||||
int const diff = std::max(seq1, seq2) - std::min(seq1, seq2);
|
||||
std::uint32_t const diff = std::max(seq1, seq2) - std::min(seq1, seq2);
|
||||
|
||||
if (diff < Tuning::kConvergedLedgerLimit)
|
||||
{
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace xrpl::Tuning {
|
||||
|
||||
/** How many ledgers off a server can be and we will
|
||||
still consider it converged */
|
||||
static constexpr auto kConvergedLedgerLimit = 24;
|
||||
static constexpr std::uint32_t kConvergedLedgerLimit = 24;
|
||||
|
||||
/** How many ledgers off a server has to be before we
|
||||
consider it diverged */
|
||||
static constexpr auto kDivergedLedgerLimit = 128;
|
||||
static constexpr std::uint32_t kDivergedLedgerLimit = 128;
|
||||
|
||||
/** The soft cap on the number of ledger entries in a single reply. */
|
||||
static constexpr auto kSoftMaxReplyNodes = 8192;
|
||||
|
||||
Reference in New Issue
Block a user