mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-02 16:26:48 +00:00
clang
This commit is contained in:
@@ -1314,12 +1314,10 @@ OverlayImpl::relay(
|
||||
|
||||
if (enabledTarget > enabledInSkip && peers.size() > 1)
|
||||
{
|
||||
auto const k = std::min(
|
||||
static_cast<std::size_t>(enabledTarget), peers.size());
|
||||
auto const k = std::min(static_cast<std::size_t>(enabledTarget), peers.size());
|
||||
for (std::size_t i = 0; i < k; ++i)
|
||||
{
|
||||
auto const j =
|
||||
i + randInt<std::size_t>(peers.size() - 1 - i);
|
||||
auto const j = i + randInt<std::size_t>(peers.size() - 1 - i);
|
||||
std::swap(peers[i], peers[j]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <xrpl/json/json_forwards.h>
|
||||
#include <xrpl/json/json_value.h>
|
||||
#include <xrpl/ledger/Ledger.h>
|
||||
#include <xrpl/protocol/HashPrefix.h>
|
||||
#include <xrpl/protocol/KeyType.h>
|
||||
#include <xrpl/protocol/LedgerHeader.h>
|
||||
#include <xrpl/protocol/Protocol.h>
|
||||
@@ -50,7 +51,6 @@
|
||||
#include <xrpl/protocol/STTx.h>
|
||||
#include <xrpl/protocol/Serializer.h>
|
||||
#include <xrpl/protocol/TxFlags.h>
|
||||
#include <xrpl/protocol/HashPrefix.h>
|
||||
#include <xrpl/protocol/digest.h>
|
||||
#include <xrpl/protocol/jss.h>
|
||||
#include <xrpl/protocol/tokens.h>
|
||||
@@ -309,13 +309,11 @@ PeerImp::send(std::shared_ptr<Message> const& m)
|
||||
auto validator = m->getValidatorKey();
|
||||
if (validator && !squelch_.expireSquelch(*validator))
|
||||
{
|
||||
overlay_.reportOutboundTraffic(
|
||||
TrafficCount::Category::SquelchSuppressed, bufSize);
|
||||
overlay_.reportOutboundTraffic(TrafficCount::Category::SquelchSuppressed, bufSize);
|
||||
return;
|
||||
}
|
||||
|
||||
overlay_.reportOutboundTraffic(
|
||||
safeCast<TrafficCount::Category>(m->getCategory()), bufSize);
|
||||
overlay_.reportOutboundTraffic(safeCast<TrafficCount::Category>(m->getCategory()), bufSize);
|
||||
|
||||
overlay_.reportOutboundTraffic(TrafficCount::Category::Total, bufSize);
|
||||
|
||||
|
||||
@@ -61,10 +61,7 @@ public:
|
||||
}
|
||||
|
||||
void
|
||||
send(
|
||||
Json::Value const&,
|
||||
std::shared_ptr<std::string const> const& serialized,
|
||||
bool) override
|
||||
send(Json::Value const&, std::shared_ptr<std::string const> const& serialized, bool) override
|
||||
{
|
||||
auto sp = ws_.lock();
|
||||
if (!sp)
|
||||
|
||||
Reference in New Issue
Block a user