clang-tidy nit in 6c2ba583d5dde911b4cf32edf5baf5acdb9824fb:
<details>
<summary>git diff on 50c04bce87</summary>
diff --git a/src/node/txdownloadman_impl.cpp b/src/node/txdownloadman_impl.cpp
index 8db30d21d1..a514ac8143 100644
--- a/src/node/txdownloadman_impl.cpp
+++ b/src/node/txdownloadman_impl.cpp
@@ -275,12 +275,12 @@ std::vector<GenTxidVariant> TxDownloadManagerImpl::GetRequestsToSend(NodeId node
auto requestable = m_txrequest.GetRequestable(nodeid, current_time, &expired);
for (const auto& entry : expired) {
LogDebug(BCLog::NET, "timeout of inflight %s %s from peer=%d\n", entry.second.IsWtxid() ? "wtx" : "tx",
- entry.second.ToUint256().ToString(), entry.first);
+ entry.second.ToUint256().ToString(), entry.first);
}
for (const GenTxidVariant& gtxid : requestable) {
if (!AlreadyHaveTx(gtxid, /*include_reconsiderable=*/false)) {
LogDebug(BCLog::NET, "Requesting %s %s peer=%d\n", gtxid.IsWtxid() ? "wtx" : "tx",
- gtxid.ToUint256().ToString(), nodeid);
+ gtxid.ToUint256().ToString(), nodeid);
requests.emplace_back(gtxid);
m_txrequest.RequestedTx(nodeid, gtxid, current_time + GETDATA_TX_INTERVAL);
} else {
diff --git a/src/test/txrequest_tests.cpp b/src/test/txrequest_tests.cpp
index 298586db37..e6b3e8bc15 100644
--- a/src/test/txrequest_tests.cpp
+++ b/src/test/txrequest_tests.cpp
@@ -161,17 +161,18 @@ public:
* backwards (but note that the ordering of this event only follows the scenario's m_now.
*/
void Check(NodeId peer, const std::vector<GenTxidVariant>& expected, size_t candidates, size_t inflight,
- size_t completed, const std::string& checkname,
- std::chrono::microseconds offset = std::chrono::microseconds{0})
+ size_t completed, const std::string& checkname,
+ std::chrono::microseconds offset = std::chrono::microseconds{0})
{
const auto comment = m_testname + " " + checkname;
auto& runner = m_runner;
const auto now = m_now;
assert(offset.count() <= 0);
- runner.actions.emplace_back(m_now, [=,&runner]() {
+ runner.actions.emplace_back(m_now, [=, &runner]() {
std::vector<std::pair<NodeId, GenTxidVariant>> expired_now;
auto ret = runner.txrequest.GetRequestable(peer, now + offset, &expired_now);
- for (const auto& entry : expired_now) runner.expired.insert(entry);
+ for (const auto& entry : expired_now)
+ runner.expired.insert(entry);
runner.txrequest.SanityCheck();
runner.txrequest.PostGetRequestableSanityCheck(now + offset);
size_t total = candidates + inflight + completed;
@@ -193,7 +194,7 @@ public:
{
const auto& testname = m_testname;
auto& runner = m_runner;
- runner.actions.emplace_back(m_now, [=,&runner]() {
+ runner.actions.emplace_back(m_now, [=, &runner]() {
auto it = runner.expired.find(std::pair<NodeId, GenTxidVariant>{peer, gtxid});
BOOST_CHECK_MESSAGE(it != runner.expired.end(), "[" + testname + "] missing expiration");
if (it != runner.expired.end()) runner.expired.erase(it);
diff --git a/src/txrequest.cpp b/src/txrequest.cpp
index ec2ebe978b..0d0e7543d1 100644
--- a/src/txrequest.cpp
+++ b/src/txrequest.cpp
@@ -575,7 +575,7 @@ public:
}
void ReceivedInv(NodeId peer, const GenTxidVariant& gtxid, bool preferred,
- std::chrono::microseconds reqtime)
+ std::chrono::microseconds reqtime)
{
// Bail out if we already have a CANDIDATE_BEST announcement for this (txhash, peer) combination. The case
// where there is a non-CANDIDATE_BEST announcement already will be caught by the uniqueness property of the
@@ -595,7 +595,7 @@ public:
//! Find the GenTxids to request now from peer.
std::vector<GenTxidVariant> GetRequestable(NodeId peer, std::chrono::microseconds now,
- std::vector<std::pair<NodeId, GenTxidVariant>>* expired)
+ std::vector<std::pair<NodeId, GenTxidVariant>>* expired)
{
// Move time.
SetTimePoint(now, expired);
@@ -730,7 +730,7 @@ void TxRequestTracker::PostGetRequestableSanityCheck(std::chrono::microseconds n
}
void TxRequestTracker::ReceivedInv(NodeId peer, const GenTxidVariant& gtxid, bool preferred,
- std::chrono::microseconds reqtime)
+ std::chrono::microseconds reqtime)
{
m_impl->ReceivedInv(peer, gtxid, preferred, reqtime);
}
@@ -746,7 +746,7 @@ void TxRequestTracker::ReceivedResponse(NodeId peer, const GenTxidVariant& txhas
}
std::vector<GenTxidVariant> TxRequestTracker::GetRequestable(NodeId peer, std::chrono::microseconds now,
- std::vector<std::pair<NodeId, GenTxidVariant>>* expired)
+ std::vector<std::pair<NodeId, GenTxidVariant>>* expired)
{
return m_impl->GetRequestable(peer, now, expired);
}
diff --git a/src/txrequest.h b/src/txrequest.h
index f32fb1f2b9..3f2acef3a3 100644
--- a/src/txrequest.h
+++ b/src/txrequest.h
@@ -133,7 +133,7 @@ public:
* from the specified gtxid.
*/
void ReceivedInv(NodeId peer, const GenTxidVariant& gtxid, bool preferred,
- std::chrono::microseconds reqtime);
+ std::chrono::microseconds reqtime);
/** Deletes all announcements for a given peer.
*
@@ -164,7 +164,7 @@ public:
* simultaneously by one peer, and end up being requested from them, the requests will happen in announcement order.
*/
std::vector<GenTxidVariant> GetRequestable(NodeId peer, std::chrono::microseconds now,
- std::vector<std::pair<NodeId, GenTxidVariant>>* expired = nullptr);
+ std::vector<std::pair<NodeId, GenTxidVariant>>* expired = nullptr);
/** Marks a transaction as requested, with a specified expiry.
*
</details>