refactor: Extract per-message helpers from SendMessages() (move-only) #35522

Open
pablomartin4btc wants to merge 19 commits from refactor/extract-sendmessages-helpers into master AGit
pablomartin4btc commented 2026-06-12 23:48:32 +00:00 (Migrated from github.com)

PeerManagerImpl::SendMessages() is a ~500-line function handling every p2p conditional send message type inline, which makes it hard to navigate and review. This was reduced to less than 90 lines.

I've identified this issue/ possible improvement while reviewing #34824.

-Notes:

First (prepare) commit removes the unnecessary __func__ prefix from the debug logs in SendMessages(), as suggested by maflcko. The logging macros already capture the calling function via SourceLocation, available on demand with -logsourcelocations.

Each of the following 17 commits represents a helper function extraction so it can be easily reviewed, it's only a pure code move, the only new lines are the declaration (with thread-safety annotations), the function signature, and the one-line call site, and they can be reviewed with the git options: --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space.

One final cleanup commit normalises formatting and simplifies some of the extracted helpers, preserving existing control flow and lock scopes.

`PeerManagerImpl::SendMessages()` is a ~500-line function handling every p2p conditional send message type inline, which makes it hard to navigate and review. This was reduced to less than 90 lines. I've [identified](https://github.com/bitcoin/bitcoin/pull/34824#pullrequestreview-4445529843) this issue/ possible improvement while reviewing #34824. -**_Notes_**: First (prepare) commit removes the unnecessary `__func__` prefix from the debug logs in SendMessages(), as [suggested](https://github.com/bitcoin/bitcoin/pull/35522#issuecomment-6144362450) by maflcko. The logging macros already capture the calling function via `SourceLocation`, available on demand with `-logsourcelocations`. Each of the following 17 commits represents a helper function extraction so it can be easily reviewed, it's only a pure code move, the only new lines are the declaration (with thread-safety annotations), the function signature, and the one-line call site, and they can be reviewed with the git options: `--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`. One final cleanup commit normalises formatting and simplifies some of the extracted helpers, preserving existing control flow and lock scopes.
DrahtBot commented 2026-06-12 23:48:40 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK w0xlt
Concept ACK hodlinator

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36955 (p2p: Use separate compact block nonce per network by mzumsande)
  • #36787 (cmpctblock: Cache serialized cmpctblock msg for relay [part of prefill series] by davidgumberg)
  • #35591 ([DO NOT MERGE] Erlay: bandwidth-efficient transaction relay protocol (Full implementation) by sr-gi)
  • #35558 (p2p: Prefill compact blocks by davidgumberg)
  • #35502 (refactor: extract per-message helpers from ProcessMessage (move-only) by w0xlt)
  • #35229 (refactor: Use CBlockIndex parameters as reference by optout21)
  • #34824 (net: encapsulate TxRelay state and replace recursive mutexes by w0xlt)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/35522 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/35522.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/35522#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [w0xlt](https://github.com/bitcoin/bitcoin/pull/35522#pullrequestreview-6063001150) | | Concept ACK | [hodlinator](https://github.com/bitcoin/bitcoin/pull/35522#pullrequestreview-5207925196) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#36955](https://github.com/bitcoin/bitcoin/pull/36955) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36955.svg"></sub> (p2p: Use separate compact block nonce per network by mzumsande) * [#36787](https://github.com/bitcoin/bitcoin/pull/36787) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36787.svg"></sub> (cmpctblock: Cache serialized cmpctblock msg for relay [part of prefill series] by davidgumberg) * [#35591](https://github.com/bitcoin/bitcoin/pull/35591) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35591.svg"></sub> ([DO NOT MERGE] Erlay: bandwidth-efficient transaction relay protocol (Full implementation) by sr-gi) * [#35558](https://github.com/bitcoin/bitcoin/pull/35558) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35558.svg"></sub> (p2p: Prefill compact blocks by davidgumberg) * [#35502](https://github.com/bitcoin/bitcoin/pull/35502) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35502.svg"></sub> (refactor: extract per-message helpers from ProcessMessage (move-only) by w0xlt) * [#35229](https://github.com/bitcoin/bitcoin/pull/35229) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35229.svg"></sub> (refactor: Use CBlockIndex parameters as reference by optout21) * [#34824](https://github.com/bitcoin/bitcoin/pull/34824) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34824.svg"></sub> (net: encapsulate TxRelay state and replace recursive mutexes by w0xlt) If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. <!--5faf32d7da4f0f540f40219e4f7537a3-->
pablomartin4btc commented 2026-06-12 23:52:31 +00:00 (Migrated from github.com)

@w0xlt, my first impulse is to put it into draft till your both PRs #34824 and #35502 land and get merged before but perhaps you find this useful and easier to work on those changes on top of this one?

@w0xlt, my first impulse is to put it into draft till your both PRs #34824 and #35502 land and get merged before but perhaps you find this useful and easier to work on those changes on top of this one?
w0xlt (Migrated from github.com) reviewed 2026-06-14 07:48:55 +00:00
w0xlt (Migrated from github.com) left a comment
Approach ACK, same pattern as https://github.com/bitcoin/bitcoin/pull/35502.
w0xlt (Migrated from github.com) commented 2026-06-14 07:48:52 +00:00

MaybeSendTxMessages acquires tx_relay lock internally.
It only requires cs_main and g_msgproc_mutex held.

    /** Schedule trickle and send tx inventory messages. */
`MaybeSendTxMessages` acquires tx_relay lock internally. It only requires `cs_main` and `g_msgproc_mutex` held. ```suggestion /** Schedule trickle and send tx inventory messages. */ ```
w0xlt commented 2026-06-14 07:52:28 +00:00 (Migrated from github.com)

@w0xlt, my first impulse is to put it into draft till your both PRs https://github.com/bitcoin/bitcoin/pull/34824 and https://github.com/bitcoin/bitcoin/pull/35502 land and get merged before but perhaps you find this useful and easier to work on those changes on top of this one?

I don’t think this PR needs to be draft. Keeping it open is useful for review.

If this, #34824, or #35502 lands first, rebasing should be straightforward.

>@w0xlt, my first impulse is to put it into draft till your both PRs https://github.com/bitcoin/bitcoin/pull/34824 and https://github.com/bitcoin/bitcoin/pull/35502 land and get merged before but perhaps you find this useful and easier to work on those changes on top of this one? I don’t think this PR needs to be draft. Keeping it open is useful for review. If this, #34824, or #35502 lands first, rebasing should be straightforward.
pablomartin4btc (Migrated from github.com) reviewed 2026-06-15 14:25:13 +00:00
pablomartin4btc (Migrated from github.com) commented 2026-06-15 14:25:13 +00:00

Done. Thanks!

Done. Thanks!
pablomartin4btc commented 2026-06-15 15:05:11 +00:00 (Migrated from github.com)

-Updates:

  • Corrected misleading comment on MaybeSendTxMessages(), observed by @w0xlt.

(iwyu CI failure is not related and I think it's being fixed in #35535)

-<ins>_**Updates**_</ins>: - Corrected misleading comment on `MaybeSendTxMessages()`, [observed](https://github.com/bitcoin/bitcoin/pull/35522#discussion_r3409208307) by @w0xlt. (iwyu CI failure is not related and I think it's being fixed in #35535)
DrahtBot commented 2026-06-15 15:48:53 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task iwyu: https://github.com/bitcoin/bitcoin/actions/runs/27553084448/job/81447465260
LLM reason (✨ experimental): CI failed because IWYU detected and auto-modified an include in src/bench/pool.cpp (and intentionally returned failure: “Failure generated from IWYU”).

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `iwyu`: https://github.com/bitcoin/bitcoin/actions/runs/27553084448/job/81447465260</sub> <sub>LLM reason (✨ experimental): CI failed because IWYU detected and auto-modified an include in `src/bench/pool.cpp` (and intentionally returned failure: “Failure generated from IWYU”).</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
DrahtBot commented 2026-07-25 12:11:56 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
pablomartin4btc commented 2026-08-13 01:14:12 +00:00 (Migrated from github.com)

-Updates:

  • Rebased.
-<ins>_**Updates**_</ins>: - Rebased.
DrahtBot commented 2026-09-14 15:51:47 +00:00 (Migrated from github.com)

🐙 This pull request conflicts with the target branch and needs rebase.

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
hodlinator (Migrated from github.com) reviewed 2026-09-15 09:07:20 +00:00
hodlinator (Migrated from github.com) left a comment

Concept ACK

Was recently reviewing some code here and felt it would have been nice to be able to refer to smaller parts of SendMessages() by name.

Concept ACK Was recently reviewing some code here and felt it would have been nice to be able to refer to smaller parts of `SendMessages()` by name.
w0xlt commented 2026-09-24 18:30:11 +00:00 (Migrated from github.com)

I rebased this branch locally onto bfdcd9797c and I tried a few non-blocking cleanups locally, similar to those in #35502:

Details
  • Aligned multiline parameter lists, logging arguments, and the fRevertToInv condition; normalized pointer/reference spacing and single-statement if formatting.
  • Renamed MaybeSendInitialGetheaders() to MaybeSendInitialGetHeaders(), matching MaybeSendGetHeaders().
  • Grouped both sends in MaybeSendTxMessages() under one if (ScheduleTxRelayTrickle(...)), removing the temporary and repeated checks.
  • Combined the nested bloom-filter conditions in MaybeSendMempoolResponse() and staller conditions in QueueBlocksGetData(), preserving short-circuit evaluation.
  • Replaced comparisons of size() with zero with empty() in MaybeSendTxInventory() and CheckBlockFlightTimeout().
  • Simplified CheckBlockSyncTimeouts() to return CheckHeadersSyncTimeout(...) directly. In ComputeSyncBlocksAndHeaders(), removed the redundant else after return and returned the final boolean condition directly.
diff
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index ae1593af46..2302ca7379 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -858,9 +858,9 @@ private:
         EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex, tx_relay.m_tx_inventory_mutex);
 
     /** Kick off initial headers sync with a peer if not yet started. */
-    void MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeState& state,
-        bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
-        const Consensus::Params& consensusParams)
+    void MaybeSendInitialGetHeaders(CNode& node, Peer& peer, CNodeState& state,
+                                    bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
+                                    const Consensus::Params& consensusParams)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
 
     /** Announce new blocks to a peer via headers, compact blocks, or inv as appropriate. */
@@ -869,8 +869,8 @@ private:
 
     /** Send queued headers as a compact block or headers message; sets fRevertToInv if neither applies. */
     void SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeState& state,
-        const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex,
-        bool& fRevertToInv)
+                                   const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex,
+                                   bool& fRevertToInv)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex, !m_most_recent_block_mutex);
 
     /** Fall back to inv-announcing the chain tip when header relay is not possible. */
@@ -883,8 +883,8 @@ private:
 
     /** Check stall and download timeouts; returns true if the caller should return early. */
     bool CheckBlockSyncTimeouts(CNode& node, Peer& peer, CNodeState& state,
-        std::chrono::microseconds current_time,
-        const Consensus::Params& consensusParams)
+                                std::chrono::microseconds current_time,
+                                const Consensus::Params& consensusParams)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
 
     /** Pause block downloads from manual peers or disconnect others on a stall; returns true if detected. */
@@ -893,28 +893,28 @@ private:
 
     /** Disconnect peer if a block in flight has timed out; returns true if disconnected. */
     bool CheckBlockFlightTimeout(CNode& node, CNodeState& state,
-        std::chrono::microseconds current_time, const Consensus::Params& consensusParams)
+                                 std::chrono::microseconds current_time, const Consensus::Params& consensusParams)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
 
     /** Disconnect or reset sync state if initial headers sync has timed out; returns true if disconnected. */
     bool CheckHeadersSyncTimeout(CNode& node, Peer& peer, CNodeState& state,
-        std::chrono::microseconds current_time)
+                                 std::chrono::microseconds current_time)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
 
     /** Build and send getdata requests for blocks and transactions. */
     void MaybeSendGetData(CNode& node, Peer& peer, CNodeState& state,
-        bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time)
+                          bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex, !m_tx_download_mutex);
 
     /** Queue block getdata requests into vGetData. */
     void QueueBlocksGetData(CNode& node, Peer& peer, CNodeState& state,
-        bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
-        std::vector<CInv>& vGetData)
+                            bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
+                            std::vector<CInv>& vGetData)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
 
     /** Queue transaction getdata requests into vGetData. */
     void QueueTxGetData(CNode& node, Peer& peer, std::chrono::microseconds current_time,
-        std::vector<CInv>& vGetData)
+                        std::vector<CInv>& vGetData)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex, !m_tx_download_mutex);
 
     /** Compute whether to sync blocks and headers from this peer; also initialises m_best_header. */
@@ -923,7 +923,7 @@ private:
 
     /** Schedule trickle and send tx inventory messages. */
     void MaybeSendTxMessages(CNode& node, Peer& peer, std::vector<CInv>& vInv,
-        std::chrono::microseconds current_time)
+                             std::chrono::microseconds current_time)
         EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex);
 
     FastRandomContext m_rng GUARDED_BY(NetEventsInterface::g_msgproc_mutex);
@@ -6195,9 +6195,7 @@ void PeerManagerImpl::MaybeSendMempoolResponse(Peer::TxRelay& tx_relay, Peer& pe
         if (txinfo.fee < filterrate.GetFee(txinfo.vsize)) {
             continue;
         }
-        if (tx_relay.m_bloom_filter) {
-            if (!tx_relay.m_bloom_filter->IsRelevantAndUpdate(*txinfo.tx)) continue;
-        }
+        if (tx_relay.m_bloom_filter && !tx_relay.m_bloom_filter->IsRelevantAndUpdate(*txinfo.tx)) continue;
         tx_relay.m_tx_inventory_known_filter.insert(inv.hash);
         vInv.push_back(inv);
         if (vInv.size() == MAX_INV_SZ) {
@@ -6220,7 +6218,7 @@ void PeerManagerImpl::MaybeSendTxInventory(Peer::TxRelay& tx_relay, Peer& peer,
         auto& invs = tx_relay.m_tx_inventory_to_send;
         std::vector<CTransactionRef> res;
 
-        if (invs.size() == 0) return res;
+        if (invs.empty()) return res;
 
         // if previous allocations were excessive, shrink to the current size
         if (invs.capacity() > 2 * invs.size()) invs.shrink_to_fit();
@@ -6263,9 +6261,9 @@ void PeerManagerImpl::MaybeSendTxInventory(Peer::TxRelay& tx_relay, Peer& peer,
     }
 }
 
-void PeerManagerImpl::MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeState& state,
-    bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
-    const Consensus::Params& consensusParams)
+void PeerManagerImpl::MaybeSendInitialGetHeaders(CNode& node, Peer& peer, CNodeState& state,
+                                                 bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
+                                                 const Consensus::Params& consensusParams)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6281,8 +6279,7 @@ void PeerManagerImpl::MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeS
                the peer's known best block.  This wouldn't be possible
                if we requested starting at m_chainman.m_best_header and
                got back an empty response.  */
-            if (pindexStart->pprev)
-                pindexStart = pindexStart->pprev;
+            if (pindexStart->pprev) pindexStart = pindexStart->pprev;
             if (MaybeSendGetHeaders(node, GetLocator(pindexStart), peer)) {
                 LogDebug(BCLog::NET, "initial getheaders (%d) to peer=%d", pindexStart->nHeight, node.GetId());
 
@@ -6301,8 +6298,8 @@ void PeerManagerImpl::MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeS
 }
 
 void PeerManagerImpl::SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeState& state,
-    const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex,
-    bool& fRevertToInv)
+                                                const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex,
+                                                bool& fRevertToInv)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6312,7 +6309,7 @@ void PeerManagerImpl::SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeSt
         // We only send up to 1 block as header-and-ids, as otherwise
         // probably means we're doing an initial-ish-sync or they're slow
         LogDebug(BCLog::NET, "%s sending header-and-ids %s to peer=%d\n", __func__,
-                vHeaders.front().GetHash().ToString(), node.GetId());
+                 vHeaders.front().GetHash().ToString(), node.GetId());
 
         std::optional<CSerializedNetMsg> cached_cmpctblock_msg;
         {
@@ -6334,12 +6331,12 @@ void PeerManagerImpl::SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeSt
     } else if (peer.m_prefers_headers) {
         if (vHeaders.size() > 1) {
             LogDebug(BCLog::NET, "%s: %u headers, range (%s, %s), to peer=%d\n", __func__,
-                    vHeaders.size(),
-                    vHeaders.front().GetHash().ToString(),
-                    vHeaders.back().GetHash().ToString(), node.GetId());
+                     vHeaders.size(),
+                     vHeaders.front().GetHash().ToString(),
+                     vHeaders.back().GetHash().ToString(), node.GetId());
         } else {
             LogDebug(BCLog::NET, "%s: sending header %s to peer=%d\n", __func__,
-                    vHeaders.front().GetHash().ToString(), node.GetId());
+                     vHeaders.front().GetHash().ToString(), node.GetId());
         }
         MakeAndPushMessage(node, NetMsgType::HEADERS, TX_WITH_WITNESS(vHeaders));
         state.pindexBestHeaderSent = pBestIndex;
@@ -6367,14 +6364,14 @@ void PeerManagerImpl::SendBlockInvFallback(CNode& node, Peer& peer, CNodeState&
         // Just log for now.
         if (m_chainman.ActiveChain()[pindex->nHeight] != pindex) {
             LogDebug(BCLog::NET, "Announcing block %s not on main chain (tip=%s)\n",
-                hashToAnnounce.ToString(), m_chainman.ActiveChain().Tip()->GetBlockHash().ToString());
+                     hashToAnnounce.ToString(), m_chainman.ActiveChain().Tip()->GetBlockHash().ToString());
         }
 
         // If the peer's chain has this block, don't inv it back.
         if (!PeerHasHeader(&state, pindex)) {
             peer.m_blocks_for_inv_relay.push_back(hashToAnnounce);
             LogDebug(BCLog::NET, "%s: sending inv peer=%d hash=%s\n", __func__,
-                node.GetId(), hashToAnnounce.ToString());
+                     node.GetId(), hashToAnnounce.ToString());
         }
     }
 }
@@ -6395,9 +6392,9 @@ void PeerManagerImpl::MaybeSendBlockAnnouncements(CNode& node, Peer& peer, CNode
     LOCK(peer.m_block_inv_mutex);
     std::vector<CBlock> vHeaders;
     bool fRevertToInv = ((!peer.m_prefers_headers &&
-                         (!state.m_requested_hb_cmpctblocks || peer.m_blocks_for_headers_relay.size() > 1)) ||
+                          (!state.m_requested_hb_cmpctblocks || peer.m_blocks_for_headers_relay.size() > 1)) ||
                          peer.m_blocks_for_headers_relay.size() > MAX_BLOCKS_TO_ANNOUNCE);
-    const CBlockIndex *pBestIndex = nullptr; // last header queued for delivery
+    const CBlockIndex* pBestIndex = nullptr; // last header queued for delivery
     ProcessBlockAvailability(node.GetId()); // ensure pindexBestKnownBlock is up-to-date
 
     if (!fRevertToInv) {
@@ -6474,7 +6471,7 @@ void PeerManagerImpl::MaybeSendBlockInv(CNode& node, Peer& peer, std::vector<CIn
 }
 
 bool PeerManagerImpl::CheckBlockDownloadStall(CNode& node, CNodeState& state,
-    std::chrono::microseconds current_time)
+                                              std::chrono::microseconds current_time)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6507,7 +6504,7 @@ bool PeerManagerImpl::CheckBlockDownloadStall(CNode& node, CNodeState& state,
 }
 
 bool PeerManagerImpl::CheckBlockFlightTimeout(CNode& node, CNodeState& state,
-    std::chrono::microseconds current_time, const Consensus::Params& consensusParams)
+                                              std::chrono::microseconds current_time, const Consensus::Params& consensusParams)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6517,8 +6514,8 @@ bool PeerManagerImpl::CheckBlockFlightTimeout(CNode& node, CNodeState& state,
     // We compensate for other peers to prevent killing off peers due to our own downstream link
     // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes
     // to unreasonably increase our timeout.
-    if (state.vBlocksInFlight.size() > 0) {
-        QueuedBlock &queuedBlock = state.vBlocksInFlight.front();
+    if (!state.vBlocksInFlight.empty()) {
+        QueuedBlock& queuedBlock = state.vBlocksInFlight.front();
         int nOtherPeersWithValidatedDownloads = m_peers_downloading_from - 1;
         if (current_time > state.m_downloading_since + std::chrono::seconds{consensusParams.nPowTargetSpacing} * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) {
             LogInfo("Timeout downloading block %s, %s", queuedBlock.pindex->GetBlockHash().ToString(), node.DisconnectMsg());
@@ -6530,21 +6527,19 @@ bool PeerManagerImpl::CheckBlockFlightTimeout(CNode& node, CNodeState& state,
 }
 
 bool PeerManagerImpl::CheckBlockSyncTimeouts(CNode& node, Peer& peer, CNodeState& state,
-    std::chrono::microseconds current_time,
-    const Consensus::Params& consensusParams)
+                                             std::chrono::microseconds current_time,
+                                             const Consensus::Params& consensusParams)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
 
     if (CheckBlockDownloadStall(node, state, current_time)) return true;
     if (CheckBlockFlightTimeout(node, state, current_time, consensusParams)) return true;
-    if (CheckHeadersSyncTimeout(node, peer, state, current_time)) return true;
-
-    return false;
+    return CheckHeadersSyncTimeout(node, peer, state, current_time);
 }
 
 bool PeerManagerImpl::CheckHeadersSyncTimeout(CNode& node, Peer& peer, CNodeState& state,
-    std::chrono::microseconds current_time)
+                                              std::chrono::microseconds current_time)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6586,8 +6581,8 @@ bool PeerManagerImpl::CheckHeadersSyncTimeout(CNode& node, Peer& peer, CNodeStat
 }
 
 void PeerManagerImpl::QueueBlocksGetData(CNode& node, Peer& peer, CNodeState& state,
-    bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
-    std::vector<CInv>& vGetData)
+                                         bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time,
+                                         std::vector<CInv>& vGetData)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6614,24 +6609,22 @@ void PeerManagerImpl::QueueBlocksGetData(CNode& node, Peer& peer, CNodeState& st
                 get_inflight_budget(),
                 vToDownload, from_tip, historical_blocks->second);
         }
-        for (const CBlockIndex *pindex : vToDownload) {
+        for (const CBlockIndex* pindex : vToDownload) {
             uint32_t nFetchFlags = GetFetchFlags(peer);
             vGetData.emplace_back(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash());
             BlockRequested(node.GetId(), *pindex);
             LogDebug(BCLog::NET, "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
-                pindex->nHeight, node.GetId());
+                     pindex->nHeight, node.GetId());
         }
-        if (state.vBlocksInFlight.empty() && staller != -1) {
-            if (State(staller)->m_stalling_since == 0us) {
-                State(staller)->m_stalling_since = current_time;
-                LogDebug(BCLog::NET, "Stall started peer=%d\n", staller);
-            }
+        if (state.vBlocksInFlight.empty() && staller != -1 && State(staller)->m_stalling_since == 0us) {
+            State(staller)->m_stalling_since = current_time;
+            LogDebug(BCLog::NET, "Stall started peer=%d\n", staller);
         }
     }
 }
 
 void PeerManagerImpl::QueueTxGetData(CNode& node, Peer& peer, std::chrono::microseconds current_time,
-    std::vector<CInv>& vGetData)
+                                     std::vector<CInv>& vGetData)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6648,7 +6641,7 @@ void PeerManagerImpl::QueueTxGetData(CNode& node, Peer& peer, std::chrono::micro
 }
 
 void PeerManagerImpl::MaybeSendGetData(CNode& node, Peer& peer, CNodeState& state,
-    bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time)
+                                       bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6665,30 +6658,29 @@ void PeerManagerImpl::MaybeSendGetData(CNode& node, Peer& peer, CNodeState& stat
     //
     QueueTxGetData(node, peer, current_time, vGetData);
 
-    if (!vGetData.empty())
-        MakeAndPushMessage(node, NetMsgType::GETDATA, vGetData);
+    if (!vGetData.empty()) MakeAndPushMessage(node, NetMsgType::GETDATA, vGetData);
 }
 
 void PeerManagerImpl::MaybeSendTxMessages(CNode& node, Peer& peer, std::vector<CInv>& vInv,
-    std::chrono::microseconds current_time)
+                                          std::chrono::microseconds current_time)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
 
     if (auto tx_relay = peer.GetTxRelay(); tx_relay != nullptr) {
         LOCK(tx_relay->m_tx_inventory_mutex);
-        const bool fSendTrickle{ScheduleTxRelayTrickle(*tx_relay, node, current_time)};
-
-        // Respond to BIP35 mempool requests
-        if (fSendTrickle) MaybeSendMempoolResponse(*tx_relay, peer, node, vInv);
+        if (ScheduleTxRelayTrickle(*tx_relay, node, current_time)) {
+            // Respond to BIP35 mempool requests
+            MaybeSendMempoolResponse(*tx_relay, peer, node, vInv);
 
-        // Determine transactions to relay
-        if (fSendTrickle) MaybeSendTxInventory(*tx_relay, peer, node, vInv);
+            // Determine transactions to relay
+            MaybeSendTxInventory(*tx_relay, peer, node, vInv);
+        }
     }
 }
 
 bool PeerManagerImpl::ComputeSyncBlocksAndHeaders(const CNode& node, const Peer& peer,
-    const CNodeState& state)
+                                                  const CNodeState& state)
 {
     AssertLockHeld(cs_main);
     AssertLockHeld(g_msgproc_mutex);
@@ -6703,7 +6695,8 @@ bool PeerManagerImpl::ComputeSyncBlocksAndHeaders(const CNode& node, const Peer&
     // in IBD (once out of IBD, we sync from all peers).
     if (state.fPreferredDownload) {
         return true;
-    } else if (CanServeBlocks(peer) && !node.IsAddrFetchConn()) {
+    }
+    if (CanServeBlocks(peer) && !node.IsAddrFetchConn()) {
         // Typically this is an inbound peer. If we don't have any outbound
         // peers, or if we aren't downloading any blocks from such peers,
         // then allow block downloads from this peer, too.
@@ -6713,9 +6706,7 @@ bool PeerManagerImpl::ComputeSyncBlocksAndHeaders(const CNode& node, const Peer&
         // the latest blocks is from an inbound peer, we have to be sure to
         // eventually download it (and not just wait indefinitely for an
         // outbound peer to have it).
-        if (m_num_preferred_download_peers == 0 || mapBlocksInFlight.empty()) {
-            return true;
-        }
+        return m_num_preferred_download_peers == 0 || mapBlocksInFlight.empty();
     }
     return false;
 }
@@ -6741,8 +6732,7 @@ bool PeerManagerImpl::SendMessages(CNode& node)
     }
 
     // Don't send anything until the version handshake is complete
-    if (!node.fSuccessfullyConnected || node.fDisconnect)
-        return true;
+    if (!node.fSuccessfullyConnected || node.fDisconnect) return true;
 
     const auto now{NodeClock::now()};
     const auto current_time{GetTime<std::chrono::microseconds>()};
@@ -6779,11 +6769,11 @@ bool PeerManagerImpl::SendMessages(CNode& node)
     {
         LOCK(cs_main);
 
-        CNodeState &state = *State(node.GetId());
+        CNodeState& state = *State(node.GetId());
 
         const bool sync_blocks_and_headers_from_peer{ComputeSyncBlocksAndHeaders(node, peer, state)};
 
-        MaybeSendInitialGetheaders(node, peer, state, sync_blocks_and_headers_from_peer, current_time, consensusParams);
+        MaybeSendInitialGetHeaders(node, peer, state, sync_blocks_and_headers_from_peer, current_time, consensusParams);
 
         //
         // Try sending block announcements via headers
@@ -6797,8 +6787,7 @@ bool PeerManagerImpl::SendMessages(CNode& node)
         MaybeSendBlockInv(node, peer, vInv);
 
         MaybeSendTxMessages(node, peer, vInv, current_time);
-        if (!vInv.empty())
-            MakeAndPushMessage(node, NetMsgType::INV, vInv);
+        if (!vInv.empty()) MakeAndPushMessage(node, NetMsgType::INV, vInv);
 
         if (CheckBlockSyncTimeouts(node, peer, state, current_time, consensusParams)) return true;
 

I also adjusted the commit history:

  • Documented the four __func__ log-prefix changes in the relevant extraction messages: first SendMessages → MaybeSendBlockAnnouncements, then three logs → SendCompactBlockOrHeaders and one → SendBlockInvFallback.
  • Moved the premature declarations into their respective extraction commits: MaybeSendTxMessages(), CheckBlockFlightTimeout(), CheckHeadersSyncTimeout(), and QueueTxGetData().

Indentation-only adjustments are included in the extraction commits, with the remaining formatting and refactoring changes batched into one cleanup commit at the end.

Or, if you prefer, you can use the updated branch with these changes already applied:

https://github.com/w0xlt/bitcoin/tree/refactor/extract-sendmessages-helpers

I rebased this branch locally onto bfdcd9797cd1a1345bdaf7ee7ef48f94028262da and I tried a few non-blocking cleanups locally, similar to those in #35502: <details> <summary>Details</summary> - Aligned multiline parameter lists, logging arguments, and the `fRevertToInv` condition; normalized pointer/reference spacing and single-statement if formatting. - Renamed `MaybeSendInitialGetheaders()` to `MaybeSendInitialGetHeaders()`, matching `MaybeSendGetHeaders()`. - Grouped both sends in `MaybeSendTxMessages()` under one `if (ScheduleTxRelayTrickle(...))`, removing the temporary and repeated checks. - Combined the nested bloom-filter conditions in `MaybeSendMempoolResponse()` and staller conditions in `QueueBlocksGetData()`, preserving short-circuit evaluation. - Replaced comparisons of `size()` with zero with `empty()` in` MaybeSendTxInventory()` and `CheckBlockFlightTimeout()`. - Simplified `CheckBlockSyncTimeouts()` to return `CheckHeadersSyncTimeout(...)` directly. In `ComputeSyncBlocksAndHeaders()`, removed the redundant `else` after `return` and returned the final boolean condition directly. </details> <details> <summary>diff</summary> ```diff diff --git a/src/net_processing.cpp b/src/net_processing.cpp index ae1593af46..2302ca7379 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -858,9 +858,9 @@ private: EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex, tx_relay.m_tx_inventory_mutex); /** Kick off initial headers sync with a peer if not yet started. */ - void MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeState& state, - bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, - const Consensus::Params& consensusParams) + void MaybeSendInitialGetHeaders(CNode& node, Peer& peer, CNodeState& state, + bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, + const Consensus::Params& consensusParams) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex); /** Announce new blocks to a peer via headers, compact blocks, or inv as appropriate. */ @@ -869,8 +869,8 @@ private: /** Send queued headers as a compact block or headers message; sets fRevertToInv if neither applies. */ void SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeState& state, - const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex, - bool& fRevertToInv) + const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex, + bool& fRevertToInv) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex, !m_most_recent_block_mutex); /** Fall back to inv-announcing the chain tip when header relay is not possible. */ @@ -883,8 +883,8 @@ private: /** Check stall and download timeouts; returns true if the caller should return early. */ bool CheckBlockSyncTimeouts(CNode& node, Peer& peer, CNodeState& state, - std::chrono::microseconds current_time, - const Consensus::Params& consensusParams) + std::chrono::microseconds current_time, + const Consensus::Params& consensusParams) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex); /** Pause block downloads from manual peers or disconnect others on a stall; returns true if detected. */ @@ -893,28 +893,28 @@ private: /** Disconnect peer if a block in flight has timed out; returns true if disconnected. */ bool CheckBlockFlightTimeout(CNode& node, CNodeState& state, - std::chrono::microseconds current_time, const Consensus::Params& consensusParams) + std::chrono::microseconds current_time, const Consensus::Params& consensusParams) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex); /** Disconnect or reset sync state if initial headers sync has timed out; returns true if disconnected. */ bool CheckHeadersSyncTimeout(CNode& node, Peer& peer, CNodeState& state, - std::chrono::microseconds current_time) + std::chrono::microseconds current_time) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex); /** Build and send getdata requests for blocks and transactions. */ void MaybeSendGetData(CNode& node, Peer& peer, CNodeState& state, - bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time) + bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex, !m_tx_download_mutex); /** Queue block getdata requests into vGetData. */ void QueueBlocksGetData(CNode& node, Peer& peer, CNodeState& state, - bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, - std::vector<CInv>& vGetData) + bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, + std::vector<CInv>& vGetData) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex); /** Queue transaction getdata requests into vGetData. */ void QueueTxGetData(CNode& node, Peer& peer, std::chrono::microseconds current_time, - std::vector<CInv>& vGetData) + std::vector<CInv>& vGetData) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex, !m_tx_download_mutex); /** Compute whether to sync blocks and headers from this peer; also initialises m_best_header. */ @@ -923,7 +923,7 @@ private: /** Schedule trickle and send tx inventory messages. */ void MaybeSendTxMessages(CNode& node, Peer& peer, std::vector<CInv>& vInv, - std::chrono::microseconds current_time) + std::chrono::microseconds current_time) EXCLUSIVE_LOCKS_REQUIRED(cs_main, g_msgproc_mutex); FastRandomContext m_rng GUARDED_BY(NetEventsInterface::g_msgproc_mutex); @@ -6195,9 +6195,7 @@ void PeerManagerImpl::MaybeSendMempoolResponse(Peer::TxRelay& tx_relay, Peer& pe if (txinfo.fee < filterrate.GetFee(txinfo.vsize)) { continue; } - if (tx_relay.m_bloom_filter) { - if (!tx_relay.m_bloom_filter->IsRelevantAndUpdate(*txinfo.tx)) continue; - } + if (tx_relay.m_bloom_filter && !tx_relay.m_bloom_filter->IsRelevantAndUpdate(*txinfo.tx)) continue; tx_relay.m_tx_inventory_known_filter.insert(inv.hash); vInv.push_back(inv); if (vInv.size() == MAX_INV_SZ) { @@ -6220,7 +6218,7 @@ void PeerManagerImpl::MaybeSendTxInventory(Peer::TxRelay& tx_relay, Peer& peer, auto& invs = tx_relay.m_tx_inventory_to_send; std::vector<CTransactionRef> res; - if (invs.size() == 0) return res; + if (invs.empty()) return res; // if previous allocations were excessive, shrink to the current size if (invs.capacity() > 2 * invs.size()) invs.shrink_to_fit(); @@ -6263,9 +6261,9 @@ void PeerManagerImpl::MaybeSendTxInventory(Peer::TxRelay& tx_relay, Peer& peer, } } -void PeerManagerImpl::MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeState& state, - bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, - const Consensus::Params& consensusParams) +void PeerManagerImpl::MaybeSendInitialGetHeaders(CNode& node, Peer& peer, CNodeState& state, + bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, + const Consensus::Params& consensusParams) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6281,8 +6279,7 @@ void PeerManagerImpl::MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeS the peer's known best block. This wouldn't be possible if we requested starting at m_chainman.m_best_header and got back an empty response. */ - if (pindexStart->pprev) - pindexStart = pindexStart->pprev; + if (pindexStart->pprev) pindexStart = pindexStart->pprev; if (MaybeSendGetHeaders(node, GetLocator(pindexStart), peer)) { LogDebug(BCLog::NET, "initial getheaders (%d) to peer=%d", pindexStart->nHeight, node.GetId()); @@ -6301,8 +6298,8 @@ void PeerManagerImpl::MaybeSendInitialGetheaders(CNode& node, Peer& peer, CNodeS } void PeerManagerImpl::SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeState& state, - const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex, - bool& fRevertToInv) + const std::vector<CBlock>& vHeaders, const CBlockIndex* pBestIndex, + bool& fRevertToInv) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6312,7 +6309,7 @@ void PeerManagerImpl::SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeSt // We only send up to 1 block as header-and-ids, as otherwise // probably means we're doing an initial-ish-sync or they're slow LogDebug(BCLog::NET, "%s sending header-and-ids %s to peer=%d\n", __func__, - vHeaders.front().GetHash().ToString(), node.GetId()); + vHeaders.front().GetHash().ToString(), node.GetId()); std::optional<CSerializedNetMsg> cached_cmpctblock_msg; { @@ -6334,12 +6331,12 @@ void PeerManagerImpl::SendCompactBlockOrHeaders(CNode& node, Peer& peer, CNodeSt } else if (peer.m_prefers_headers) { if (vHeaders.size() > 1) { LogDebug(BCLog::NET, "%s: %u headers, range (%s, %s), to peer=%d\n", __func__, - vHeaders.size(), - vHeaders.front().GetHash().ToString(), - vHeaders.back().GetHash().ToString(), node.GetId()); + vHeaders.size(), + vHeaders.front().GetHash().ToString(), + vHeaders.back().GetHash().ToString(), node.GetId()); } else { LogDebug(BCLog::NET, "%s: sending header %s to peer=%d\n", __func__, - vHeaders.front().GetHash().ToString(), node.GetId()); + vHeaders.front().GetHash().ToString(), node.GetId()); } MakeAndPushMessage(node, NetMsgType::HEADERS, TX_WITH_WITNESS(vHeaders)); state.pindexBestHeaderSent = pBestIndex; @@ -6367,14 +6364,14 @@ void PeerManagerImpl::SendBlockInvFallback(CNode& node, Peer& peer, CNodeState& // Just log for now. if (m_chainman.ActiveChain()[pindex->nHeight] != pindex) { LogDebug(BCLog::NET, "Announcing block %s not on main chain (tip=%s)\n", - hashToAnnounce.ToString(), m_chainman.ActiveChain().Tip()->GetBlockHash().ToString()); + hashToAnnounce.ToString(), m_chainman.ActiveChain().Tip()->GetBlockHash().ToString()); } // If the peer's chain has this block, don't inv it back. if (!PeerHasHeader(&state, pindex)) { peer.m_blocks_for_inv_relay.push_back(hashToAnnounce); LogDebug(BCLog::NET, "%s: sending inv peer=%d hash=%s\n", __func__, - node.GetId(), hashToAnnounce.ToString()); + node.GetId(), hashToAnnounce.ToString()); } } } @@ -6395,9 +6392,9 @@ void PeerManagerImpl::MaybeSendBlockAnnouncements(CNode& node, Peer& peer, CNode LOCK(peer.m_block_inv_mutex); std::vector<CBlock> vHeaders; bool fRevertToInv = ((!peer.m_prefers_headers && - (!state.m_requested_hb_cmpctblocks || peer.m_blocks_for_headers_relay.size() > 1)) || + (!state.m_requested_hb_cmpctblocks || peer.m_blocks_for_headers_relay.size() > 1)) || peer.m_blocks_for_headers_relay.size() > MAX_BLOCKS_TO_ANNOUNCE); - const CBlockIndex *pBestIndex = nullptr; // last header queued for delivery + const CBlockIndex* pBestIndex = nullptr; // last header queued for delivery ProcessBlockAvailability(node.GetId()); // ensure pindexBestKnownBlock is up-to-date if (!fRevertToInv) { @@ -6474,7 +6471,7 @@ void PeerManagerImpl::MaybeSendBlockInv(CNode& node, Peer& peer, std::vector<CIn } bool PeerManagerImpl::CheckBlockDownloadStall(CNode& node, CNodeState& state, - std::chrono::microseconds current_time) + std::chrono::microseconds current_time) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6507,7 +6504,7 @@ bool PeerManagerImpl::CheckBlockDownloadStall(CNode& node, CNodeState& state, } bool PeerManagerImpl::CheckBlockFlightTimeout(CNode& node, CNodeState& state, - std::chrono::microseconds current_time, const Consensus::Params& consensusParams) + std::chrono::microseconds current_time, const Consensus::Params& consensusParams) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6517,8 +6514,8 @@ bool PeerManagerImpl::CheckBlockFlightTimeout(CNode& node, CNodeState& state, // We compensate for other peers to prevent killing off peers due to our own downstream link // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes // to unreasonably increase our timeout. - if (state.vBlocksInFlight.size() > 0) { - QueuedBlock &queuedBlock = state.vBlocksInFlight.front(); + if (!state.vBlocksInFlight.empty()) { + QueuedBlock& queuedBlock = state.vBlocksInFlight.front(); int nOtherPeersWithValidatedDownloads = m_peers_downloading_from - 1; if (current_time > state.m_downloading_since + std::chrono::seconds{consensusParams.nPowTargetSpacing} * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) { LogInfo("Timeout downloading block %s, %s", queuedBlock.pindex->GetBlockHash().ToString(), node.DisconnectMsg()); @@ -6530,21 +6527,19 @@ bool PeerManagerImpl::CheckBlockFlightTimeout(CNode& node, CNodeState& state, } bool PeerManagerImpl::CheckBlockSyncTimeouts(CNode& node, Peer& peer, CNodeState& state, - std::chrono::microseconds current_time, - const Consensus::Params& consensusParams) + std::chrono::microseconds current_time, + const Consensus::Params& consensusParams) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); if (CheckBlockDownloadStall(node, state, current_time)) return true; if (CheckBlockFlightTimeout(node, state, current_time, consensusParams)) return true; - if (CheckHeadersSyncTimeout(node, peer, state, current_time)) return true; - - return false; + return CheckHeadersSyncTimeout(node, peer, state, current_time); } bool PeerManagerImpl::CheckHeadersSyncTimeout(CNode& node, Peer& peer, CNodeState& state, - std::chrono::microseconds current_time) + std::chrono::microseconds current_time) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6586,8 +6581,8 @@ bool PeerManagerImpl::CheckHeadersSyncTimeout(CNode& node, Peer& peer, CNodeStat } void PeerManagerImpl::QueueBlocksGetData(CNode& node, Peer& peer, CNodeState& state, - bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, - std::vector<CInv>& vGetData) + bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time, + std::vector<CInv>& vGetData) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6614,24 +6609,22 @@ void PeerManagerImpl::QueueBlocksGetData(CNode& node, Peer& peer, CNodeState& st get_inflight_budget(), vToDownload, from_tip, historical_blocks->second); } - for (const CBlockIndex *pindex : vToDownload) { + for (const CBlockIndex* pindex : vToDownload) { uint32_t nFetchFlags = GetFetchFlags(peer); vGetData.emplace_back(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()); BlockRequested(node.GetId(), *pindex); LogDebug(BCLog::NET, "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(), - pindex->nHeight, node.GetId()); + pindex->nHeight, node.GetId()); } - if (state.vBlocksInFlight.empty() && staller != -1) { - if (State(staller)->m_stalling_since == 0us) { - State(staller)->m_stalling_since = current_time; - LogDebug(BCLog::NET, "Stall started peer=%d\n", staller); - } + if (state.vBlocksInFlight.empty() && staller != -1 && State(staller)->m_stalling_since == 0us) { + State(staller)->m_stalling_since = current_time; + LogDebug(BCLog::NET, "Stall started peer=%d\n", staller); } } } void PeerManagerImpl::QueueTxGetData(CNode& node, Peer& peer, std::chrono::microseconds current_time, - std::vector<CInv>& vGetData) + std::vector<CInv>& vGetData) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6648,7 +6641,7 @@ void PeerManagerImpl::QueueTxGetData(CNode& node, Peer& peer, std::chrono::micro } void PeerManagerImpl::MaybeSendGetData(CNode& node, Peer& peer, CNodeState& state, - bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time) + bool sync_blocks_and_headers_from_peer, std::chrono::microseconds current_time) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6665,30 +6658,29 @@ void PeerManagerImpl::MaybeSendGetData(CNode& node, Peer& peer, CNodeState& stat // QueueTxGetData(node, peer, current_time, vGetData); - if (!vGetData.empty()) - MakeAndPushMessage(node, NetMsgType::GETDATA, vGetData); + if (!vGetData.empty()) MakeAndPushMessage(node, NetMsgType::GETDATA, vGetData); } void PeerManagerImpl::MaybeSendTxMessages(CNode& node, Peer& peer, std::vector<CInv>& vInv, - std::chrono::microseconds current_time) + std::chrono::microseconds current_time) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); if (auto tx_relay = peer.GetTxRelay(); tx_relay != nullptr) { LOCK(tx_relay->m_tx_inventory_mutex); - const bool fSendTrickle{ScheduleTxRelayTrickle(*tx_relay, node, current_time)}; - - // Respond to BIP35 mempool requests - if (fSendTrickle) MaybeSendMempoolResponse(*tx_relay, peer, node, vInv); + if (ScheduleTxRelayTrickle(*tx_relay, node, current_time)) { + // Respond to BIP35 mempool requests + MaybeSendMempoolResponse(*tx_relay, peer, node, vInv); - // Determine transactions to relay - if (fSendTrickle) MaybeSendTxInventory(*tx_relay, peer, node, vInv); + // Determine transactions to relay + MaybeSendTxInventory(*tx_relay, peer, node, vInv); + } } } bool PeerManagerImpl::ComputeSyncBlocksAndHeaders(const CNode& node, const Peer& peer, - const CNodeState& state) + const CNodeState& state) { AssertLockHeld(cs_main); AssertLockHeld(g_msgproc_mutex); @@ -6703,7 +6695,8 @@ bool PeerManagerImpl::ComputeSyncBlocksAndHeaders(const CNode& node, const Peer& // in IBD (once out of IBD, we sync from all peers). if (state.fPreferredDownload) { return true; - } else if (CanServeBlocks(peer) && !node.IsAddrFetchConn()) { + } + if (CanServeBlocks(peer) && !node.IsAddrFetchConn()) { // Typically this is an inbound peer. If we don't have any outbound // peers, or if we aren't downloading any blocks from such peers, // then allow block downloads from this peer, too. @@ -6713,9 +6706,7 @@ bool PeerManagerImpl::ComputeSyncBlocksAndHeaders(const CNode& node, const Peer& // the latest blocks is from an inbound peer, we have to be sure to // eventually download it (and not just wait indefinitely for an // outbound peer to have it). - if (m_num_preferred_download_peers == 0 || mapBlocksInFlight.empty()) { - return true; - } + return m_num_preferred_download_peers == 0 || mapBlocksInFlight.empty(); } return false; } @@ -6741,8 +6732,7 @@ bool PeerManagerImpl::SendMessages(CNode& node) } // Don't send anything until the version handshake is complete - if (!node.fSuccessfullyConnected || node.fDisconnect) - return true; + if (!node.fSuccessfullyConnected || node.fDisconnect) return true; const auto now{NodeClock::now()}; const auto current_time{GetTime<std::chrono::microseconds>()}; @@ -6779,11 +6769,11 @@ bool PeerManagerImpl::SendMessages(CNode& node) { LOCK(cs_main); - CNodeState &state = *State(node.GetId()); + CNodeState& state = *State(node.GetId()); const bool sync_blocks_and_headers_from_peer{ComputeSyncBlocksAndHeaders(node, peer, state)}; - MaybeSendInitialGetheaders(node, peer, state, sync_blocks_and_headers_from_peer, current_time, consensusParams); + MaybeSendInitialGetHeaders(node, peer, state, sync_blocks_and_headers_from_peer, current_time, consensusParams); // // Try sending block announcements via headers @@ -6797,8 +6787,7 @@ bool PeerManagerImpl::SendMessages(CNode& node) MaybeSendBlockInv(node, peer, vInv); MaybeSendTxMessages(node, peer, vInv, current_time); - if (!vInv.empty()) - MakeAndPushMessage(node, NetMsgType::INV, vInv); + if (!vInv.empty()) MakeAndPushMessage(node, NetMsgType::INV, vInv); if (CheckBlockSyncTimeouts(node, peer, state, current_time, consensusParams)) return true; ``` </details> I also adjusted the commit history: - Documented the four `__func__` log-prefix changes in the relevant extraction messages: first `SendMessages` → `MaybeSendBlockAnnouncements`, then three logs → `SendCompactBlockOrHeaders` and one → `SendBlockInvFallback`. - Moved the premature declarations into their respective extraction commits: `MaybeSendTxMessages()`, `CheckBlockFlightTimeout()`, `CheckHeadersSyncTimeout()`, and `QueueTxGetData()`. Indentation-only adjustments are included in the extraction commits, with the remaining formatting and refactoring changes batched into one cleanup commit at the end. Or, if you prefer, you can use the updated branch with these changes already applied: https://github.com/w0xlt/bitcoin/tree/refactor/extract-sendmessages-helpers
First-time contributor

Earlier concerns neither republished nor resolved: 5 suggestions. See the Run archive linked from the Review report for their assessments.

No findings were published from this review.


Reviewed: 53e896e930f6 · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:806938d40e279b6d701b2e78128bb1a09b55193a0b697245a1dce6241d3081c1:3329223fb40bbbe44124b0523f0fa08f23650d06836368f60e45a38d2db02971 --> <!-- ralph-base:74f3ed9021e853aa14a402ed0ceef78544c5b4a7 --> <!-- ralph-head:53e896e930f66b49b6f9f06b99397e42b1458fa7 --> <!-- ralph-case:d730f46d133a88c81ad4faa4cfba9dd25124bfddd6bc372d13181de77aa030c1 --> Earlier concerns neither republished nor resolved: 5 suggestions. See the Run archive linked from the Review report for their assessments. No findings were published from this review. <!-- Review tier: sensitive --> --- Reviewed: [`53e896e930f6`](<https://git.fish.foo/bitcoin/bitcoin/commit/53e896e930f66b49b6f9f06b99397e42b1458fa7>) · [Review report](<https://review.fish.foo/report/35522-53e896e930f66b49b6f9f06b99397e42b1458fa7-3080-5.html>) · [Previous reports](<https://review.fish.foo/traces/35522/>) [permalink](<https://review.fish.foo/report/35522-53e896e930f66b49b6f9f06b99397e42b1458fa7-3080-5.html>)
w0xlt (Migrated from github.com) reviewed 2026-10-08 23:21:46 +00:00
w0xlt (Migrated from github.com) left a comment
ACK 78a02a95888086909d184a662c17c54234ef34f7
pablomartin4btc commented 2026-10-08 23:22:46 +00:00 (Migrated from github.com)

I rebased this branch locally onto bfdcd97 and I tried a few non-blocking cleanups locally, similar to those in #35502...
...
I also adjusted the commit history...
...
Indentation-only adjustments are included in the extraction commits, with the remaining formatting and refactoring changes batched into one cleanup commit at the end...

Thanks for the rebase, the cleanup suggestions, and the commit-history reorganization, @w0xlt — appreciated.

> I rebased this branch locally onto [bfdcd97](https://github.com/bitcoin/bitcoin/commit/bfdcd9797cd1a1345bdaf7ee7ef48f94028262da) and I tried a few non-blocking cleanups locally, similar to those in #35502... > ... > I also adjusted the commit history... > ... > Indentation-only adjustments are included in the extraction commits, with the remaining formatting and refactoring changes batched into one cleanup commit at the end... Thanks for the rebase, the cleanup suggestions, and the commit-history reorganization, @w0xlt — appreciated.
pablomartin4btc commented 2026-10-08 23:37:54 +00:00 (Migrated from github.com)

-Updates:

  • Rebased.
    • Re-threaded a ping-timeout check that landed in SendMessages() upstream after the previous rebase base, now folded into CheckBlockSyncTimeouts() (d83647e7c4 in #36080).
  • Addressed @w0xlt's feedback adding:
    • __func__ log-prefix documentation within affected commit messages;
    • premature-declaration moves;
    • a cleanup commit.
  • Updated PR description accordingly.
-<ins>_**Updates**_</ins>: - Rebased. - Re-threaded a ping-timeout check that landed in `SendMessages()` upstream after the previous rebase base, now folded into `CheckBlockSyncTimeouts()` (d83647e7c4 in [#36080](https://github.com/bitcoin/bitcoin/pull/36080)). - Addressed @w0xlt's [feedback](https://github.com/bitcoin/bitcoin/pull/35522#issuecomment-5819867707) adding: - `__func__` log-prefix documentation within affected commit messages; - premature-declaration moves; - a cleanup commit. - Updated PR description accordingly.
maflcko commented 2026-10-13 11:18:21 +00:00 (Migrated from github.com)

No behavior change apart from the __func__ prefix in four debug logs that moved out of SendMessages(), which now print SendCompactBlockOrHeaders (three logs) or SendBlockInvFallback (one log) instead of SendMessages.

This gives me LLM vibes. Can you please write the description in your own words? See https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md

Forcing reviewers to count all __func__ seems like busy work and all the weird formatting will likely look ugly in a terminal-printed git log.

In any case, the logs shouldn't be using __func__ anyway. Each log line should be unique and descriptive by itself. Maybe a prepare commit can be added to do that?

This follows the pattern of similar PRs (#35502, and some commits fa5ab02 - from #35148 -, and fa55723 from #34059)

I think all of those mentions can be removed, as they are about the processing side, not the sending side.

> No behavior change apart from the `__func__` prefix in four debug logs that moved out of `SendMessages()`, which **_now print_** `SendCompactBlockOrHeaders` (three logs) or `SendBlockInvFallback` (one log) instead of `SendMessages`. This gives me LLM vibes. Can you please write the description in your own words? See https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md Forcing reviewers to count all `__func__` seems like busy work and all the weird formatting will likely look ugly in a terminal-printed `git log`. In any case, the logs shouldn't be using `__func__` anyway. Each log line should be unique and descriptive by itself. Maybe a prepare commit can be added to do that? > This follows the pattern of similar PRs (#35502, and some commits [fa5ab02](https://github.com/bitcoin/bitcoin/commit/fa5ab0220e02377c3c855042ecdf1f5f950d0965) - from #35148 -, and [fa55723](https://github.com/bitcoin/bitcoin/commit/fa55723b8fbd4fd056dddac5b35daf2e86021422) from #34059) I think all of those mentions can be removed, as they are about the processing side, not the sending side.
pablomartin4btc commented 2026-10-14 06:56:54 +00:00 (Migrated from github.com)

Thanks @maflcko!

No behavior change apart from the __func__ prefix in four debug logs that moved out of SendMessages(), which now print SendCompactBlockOrHeaders (three logs) or SendBlockInvFallback (one log) instead of SendMessages.

This gives me LLM vibes. Can you please write the description in your own words? See https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md

Ok, it doesn't sound to me like that but given the reasons below I'll remove it anyway. I originally included it because a reviewer had already flagged that "move-only" wasn't quite accurate — the log calls print different output on this branch (the new extracted function names) versus master (SendMessages) — so I thought it was worth calling out in the description too.

Forcing reviewers to count all __func__ seems like busy work and all the weird formatting will likely look ugly in a terminal-printed git log.

Ok, I'll take it into account for next PRs, and I also forgot about the git log consequences. Again, it will be removed as part of the change you suggested below.

In any case, the logs shouldn't be using __func__ anyway. Each log line should be unique and descriptive by itself. Maybe a prepare commit can be added to do that?

I'd do that, sure — I see the logging macros already capture the function name/file/line automatically via SourceLocation, and it's available on demand with -logsourcelocations, so there's no need to hand-embed __func__ in the message.

This follows the pattern of similar PRs (#35502, and some commits fa5ab02 - from #35148 -, and fa55723 from #34059)

I think all of those mentions can be removed, as they are about the processing side, not the sending side.

I'll remove that too; it seems misleading.

Thanks @maflcko! > > No behavior change apart from the `__func__` prefix in four debug logs that moved out of `SendMessages()`, which **_now print_** `SendCompactBlockOrHeaders` (three logs) or `SendBlockInvFallback` (one log) instead of `SendMessages`. > > This gives me LLM vibes. Can you please write the description in your own words? See https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md Ok, it doesn't sound to me like that but given the reasons below I'll remove it anyway. I originally included it because a reviewer had already flagged that "move-only" wasn't quite accurate — the log calls print different output on this branch (the new extracted function names) versus master (`SendMessages`) — so I thought it was worth calling out in the description too. > Forcing reviewers to count all `__func__` seems like busy work and all the weird formatting will likely look ugly in a terminal-printed `git log`. Ok, I'll take it into account for next PRs, and I also forgot about the `git log` consequences. Again, it will be removed as part of the change you suggested below. > In any case, the logs shouldn't be using `__func__` anyway. Each log line should be unique and descriptive by itself. Maybe a prepare commit can be added to do that? I'd do that, sure — I see the logging macros already capture the function name/file/line automatically via `SourceLocation`, and it's available on demand with `-logsourcelocations`, so there's no need to hand-embed `__func__` in the message. > > This follows the pattern of similar PRs (#35502, and some commits [fa5ab02](https://github.com/bitcoin/bitcoin/commit/fa5ab0220e02377c3c855042ecdf1f5f950d0965) - from #35148 -, and [fa55723](https://github.com/bitcoin/bitcoin/commit/fa55723b8fbd4fd056dddac5b35daf2e86021422) from #34059) > > I think all of those mentions can be removed, as they are about the processing side, not the sending side. I'll remove that too; it seems misleading.
pablomartin4btc commented 2026-10-19 22:40:31 +00:00 (Migrated from github.com)

-Updates:

  • Addressed @maflcko's feedback.
    • Created a new prepare commit removing __func__ prefix from the debug logs in SendMessages().
    • Removed misleading processing side references from the PR description.
-<ins>_**Updates**_</ins>: - Addressed @maflcko's [feedback](https://github.com/bitcoin/bitcoin/pull/35522#issuecomment-6144362450). - Created a new prepare commit removing `__func__` prefix from the debug logs in `SendMessages()`. - Removed misleading processing side references from the PR description.
w0xlt (Migrated from github.com) reviewed 2026-11-11 20:29:35 +00:00
w0xlt (Migrated from github.com) left a comment

reACK 4d707f65bd

reACK 4d707f65bd1ed767900585328809290415e40400
maflcko commented 2026-11-12 10:08:14 +00:00 (Migrated from github.com)

This conflicts with a reviewed pull that is marked for possible backport. I think it is a better use of review resources to defer this pull and rebase/review it later than to make the backport differ, which would require additional review/"rebase".

This conflicts with a reviewed pull that is marked for possible backport. I think it is a better use of review resources to defer this pull and rebase/review it later than to make the backport differ, which would require additional review/"rebase".
pablomartin4btc commented 2026-11-12 22:37:43 +00:00 (Migrated from github.com)

Converting to draft. I'll rebase once #36521 gets in.

Converting to draft. I'll rebase once #36521 gets in.
pablomartin4btc commented 2026-11-24 21:02:28 +00:00 (Migrated from github.com)

-Updates:

  • Rebased.
-<ins>_**Updates**_</ins>: - Rebased.
w0xlt (Migrated from github.com) reviewed 2026-11-25 18:37:18 +00:00
w0xlt (Migrated from github.com) left a comment

reACK 53e896e930

reACK 53e896e930f66b49b6f9f06b99397e42b1458fa7
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!35522
No description provided.