refactor: extract per-message helpers from ProcessMessage (move-only) #35502

Open
w0xlt wants to merge 11 commits from refactor/extract-processmessage-helpers into master AGit
w0xlt commented 2026-06-10 01:54:27 +00:00 (Migrated from github.com)

PeerManagerImpl::ProcessMessage() is a ~1500-line function handling every p2p message type inline, which makes it hard to navigate and review.

This PR continues splitting it into per-message helper functions, following the pattern of the recently merged fa5ab0220e (ProcessPong()) and fa55723b8f (ProcessAddrs()), as suggested by maflcko https://github.com/bitcoin/bitcoin/pull/34588#issuecomment-4658892004.

A preparatory commit removes the __func__ prefix from one getheaders debug log, so moving it doesn't change the output.

Nine handlers are extracted, one move-only commit each:

  • ProcessGetAddr() — getaddr
  • ProcessGetDataMessage() — getdata (named to avoid colliding with the existing ProcessGetData(), which services the request queue this handler fills)
  • ProcessGetBlocks() — getblocks
  • ProcessGetHeaders() — getheaders
  • ProcessInv() — inv
  • ProcessSendTxRcncl() — sendtxrcncl
  • ProcessTx() — tx
  • ProcessCompactBlock() — cmpctblock
  • ProcessVersion() — version

Each extraction commit is a code move with indentation adjustments: the only new lines are the declaration (with thread-safety annotations), the function signature, and the one-line call site.
Each call site is Helper(...); return;, so return statements inside the moved bodies keep identical semantics. No behavior change beyond debug log output.

One final cleanup commit normalizes the remaining formatting, replaces equivalent break statements with return in ProcessSendTxRcncl(), and simplifies the send_getaddr conditional in ProcessVersion().

Each extraction commit can be reviewed with the git options:
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space

Declarations and definitions are placed next to related existing helpers (e.g. ProcessGetDataMessage next to ProcessGetData, ProcessGetBlocks next to ProcessGetBlockData, ProcessGetAddr after ProcessAddrs).

`PeerManagerImpl::ProcessMessage()` is a ~1500-line function handling every p2p message type inline, which makes it hard to navigate and review. This PR continues splitting it into per-message helper functions, following the pattern of the recently merged fa5ab0220e02377c3c855042ecdf1f5f950d0965 (`ProcessPong()`) and fa55723b8fbd4fd056dddac5b35daf2e86021422 (`ProcessAddrs()`), as suggested by maflcko https://github.com/bitcoin/bitcoin/pull/34588#issuecomment-4658892004. A preparatory commit removes the `__func__` prefix from one getheaders debug log, so moving it doesn't change the output. Nine handlers are extracted, one move-only commit each: * `ProcessGetAddr()` — `getaddr` * `ProcessGetDataMessage()` — `getdata` (named to avoid colliding with the existing `ProcessGetData()`, which services the request queue this handler fills) * `ProcessGetBlocks()` — `getblocks` * `ProcessGetHeaders()` — `getheaders` * `ProcessInv()` — `inv` * `ProcessSendTxRcncl()` — `sendtxrcncl` * `ProcessTx()` — `tx` * `ProcessCompactBlock()` — `cmpctblock` * `ProcessVersion()` — `version` Each extraction commit is a code move with indentation adjustments: the only new lines are the declaration (with thread-safety annotations), the function signature, and the one-line call site. Each call site is `Helper(...); return;`, so `return` statements inside the moved bodies keep identical semantics. No behavior change beyond debug log output. One final cleanup commit normalizes the remaining formatting, replaces equivalent `break` statements with `return` in `ProcessSendTxRcncl()`, and simplifies the `send_getaddr` conditional in `ProcessVersion()`. Each extraction commit can be reviewed with the git options: `--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space` Declarations and definitions are placed next to related existing helpers (e.g. `ProcessGetDataMessage` next to `ProcessGetData`, `ProcessGetBlocks` next to `ProcessGetBlockData`, `ProcessGetAddr` after `ProcessAddrs`).
DrahtBot commented 2026-06-10 01:54:35 +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 l0rinc, vasild, pablomartin4btc
Concept ACK stickies-v, theStack
Stale ACK pseudoramdom

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:

  • #36906 (Detect transaction problems early during deserialization by sipa)
  • #36787 (cmpctblock: Cache serialized cmpctblock msg for relay [part of prefill series] by davidgumberg)
  • #36607 (private broadcast: Extra guard against unintended non-private broadcast of private transactions by optout21)
  • #36477 (private broadcast: show finished transactions in getprivatebroadcastinfo by vasild)
  • #35936 (net: reject oversized locators before allocating by l0rinc)
  • #35920 (net_processing: Ignore MSG_WITNESS_TX entries from INV messages by ajtowns)
  • #35558 (p2p: Prefill compact blocks by davidgumberg)
  • #35522 (refactor: Extract per-message helpers from SendMessages() (move-only) by pablomartin4btc)
  • #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/35502 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/35502.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/35502#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 | [l0rinc](https://github.com/bitcoin/bitcoin/pull/35502#issuecomment-6804792256), [vasild](https://github.com/bitcoin/bitcoin/pull/35502#pullrequestreview-6024465017), [pablomartin4btc](https://github.com/bitcoin/bitcoin/pull/35502#pullrequestreview-6046706770) | | Concept ACK | [stickies-v](https://github.com/bitcoin/bitcoin/pull/35502#issuecomment-4669325160), [theStack](https://github.com/bitcoin/bitcoin/pull/35502#pullrequestreview-4468168675) | | Stale ACK | [pseudoramdom](https://github.com/bitcoin/bitcoin/pull/35502#issuecomment-4677153432) | 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: * [#36906](https://github.com/bitcoin/bitcoin/pull/36906) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36906.svg"></sub> (Detect transaction problems early during deserialization by sipa) * [#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) * [#36607](https://github.com/bitcoin/bitcoin/pull/36607) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36607.svg"></sub> (private broadcast: Extra guard against unintended non-private broadcast of private transactions by optout21) * [#36477](https://github.com/bitcoin/bitcoin/pull/36477) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36477.svg"></sub> (private broadcast: show finished transactions in getprivatebroadcastinfo by vasild) * [#35936](https://github.com/bitcoin/bitcoin/pull/35936) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35936.svg"></sub> (net: reject oversized locators before allocating by l0rinc) * [#35920](https://github.com/bitcoin/bitcoin/pull/35920) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35920.svg"></sub> (net_processing: Ignore MSG_WITNESS_TX entries from INV messages by ajtowns) * [#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) * [#35522](https://github.com/bitcoin/bitcoin/pull/35522) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35522.svg"></sub> (refactor: Extract per-message helpers from SendMessages() (move-only) by pablomartin4btc) * [#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-->
stickies-v commented 2026-06-10 10:49:42 +00:00 (Migrated from github.com)

Concept ACK. Pretty straightforward change that makes it easier to navigate net_processing and better encapsulates logic.

Concept ACK. Pretty straightforward change that makes it easier to navigate net_processing and better encapsulates logic.
theStack (Migrated from github.com) reviewed 2026-06-10 13:19:33 +00:00
theStack (Migrated from github.com) left a comment

Concept ACK

Fwiw this has been proposed at least once: https://github.com/bitcoin/bitcoin/pull/9608 (it seems to have failed more due to lack of review back then rather than on strong pushback, as far as I understand)

Concept ACK Fwiw this has been proposed at least once: https://github.com/bitcoin/bitcoin/pull/9608 (it seems to have failed more due to lack of review back then rather than on strong pushback, as far as I understand)
pablomartin4btc (Migrated from github.com) reviewed 2026-06-10 15:06:46 +00:00
pablomartin4btc (Migrated from github.com) left a comment

Concept ACK.

I'm in favour of these refactoring, while reviewing #34824 also identified another possible candidate SendMessages() which is in the same file.

Concept ACK. I'm in favour of these refactoring, while reviewing #34824 also [identified](https://github.com/bitcoin/bitcoin/pull/34824#pullrequestreview-4445529843) another possible candidate `SendMessages()` which is in the same file.
pseudoramdom commented 2026-06-11 04:21:57 +00:00 (Migrated from github.com)

code review ACK 4fe745f27bd8a4a637df522421a4a7104923ca3e
Except for a new comment for ProcessGetDataMessage, verified the change is a move-only refactor.
Also verified using git show--color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change <commit> against each commit.

code review ACK 4fe745f27bd8a4a637df522421a4a7104923ca3e Except for a new comment for ProcessGetDataMessage, verified the change is a move-only refactor. Also verified using `git show--color-moved=dimmed-zebra --color-moved-ws=allow-indentation-change <commit>` against each commit.
thomasbuilds commented 2026-06-11 06:08:24 +00:00 (Migrated from github.com)

code review ACK 4fe745f

Verified each commit is a pure code move (only new lines are declarations, call sites, and one doc comment), call sites preserve return semantics, and the thread-safety annotations match what each body locks. It compiles cleanly with clang -Wthread-safety.

code review ACK 4fe745f Verified each commit is a pure code move (only new lines are declarations, call sites, and one doc comment), call sites preserve return semantics, and the thread-safety annotations match what each body locks. It compiles cleanly with clang -Wthread-safety.
pablomartin4btc (Migrated from github.com) reviewed 2026-06-12 04:01:10 +00:00
pablomartin4btc (Migrated from github.com) left a comment

ACK github.com/bitcoin/bitcoin@4fe745f27b.

ProcessMessage() went from ~1500 to ~1000 lines, but CMPCTBLOCK (248 lines) and VERSION (235 lines) remain the two dominant inline blocks — extracting those two alone would drop it another ~480 lines, bringing it under 550. The same move-only pattern applied here would make both independently reviewable. Not a blocker, perhaps worth a follow-up PR in the same vein?

On a side note, on the previous attempt mentioned above, there were concerns about "obscuring the control flow", I don't think this is the case here.

ACK https://github.com/bitcoin/bitcoin/commit/4fe745f27bd8a4a637df522421a4a7104923ca3e. `ProcessMessage()` went from ~1500 to ~1000 lines, but `CMPCTBLOCK` (248 lines) and `VERSION` (235 lines) remain the two dominant inline blocks — extracting those two alone would drop it another ~480 lines, bringing it under 550. The same move-only pattern applied here would make both independently reviewable. Not a blocker, perhaps worth a follow-up PR in the same vein? On a side note, on the previous [attempt](https://github.com/bitcoin/bitcoin/pull/9608) mentioned [above](https://github.com/bitcoin/bitcoin/pull/35502#pullrequestreview-4468168675), there were concerns about "[obscuring the control flow](https://github.com/bitcoin/bitcoin/pull/9608#issuecomment-275336146)", I don't think this is the case here.
davidgumberg commented 2026-06-19 00:44:12 +00:00 (Migrated from github.com)

Concept -0

Let's say I'm reading a function called ProcessBlock() in net_processing.cpp:

  • Is this function called by ProcessMessage()?
  • Does ProcessMessage() do any set up before invoking ProcessBlock()?
  • Are there any other callers of ProcessBlock() and what are their expectations?
  • Are all the callers of ProcessBlock() in the process messages thread?

These questions have to be answered when reading / modifying code and for all of the logic that lives in the ProcessMessage() ~switch statement these ambiguities don't exist. I think ProcessBlock() is a good example because it has multiple callers, and anyone reading it or modifying it should find them and think carefully about what they all do. That is a cost paid for by the reusability of ProcessBlock().

I think the main thing I don't share is the feeling that ProcessMessage() is too long. It's pretty flat, and there is ~0 state that lives outside of the if(msg_type) {, so I don't feel burdened by any of the rest of the function when I'm reading the logic for the message I'm interested in.

Not trying to bikeshed, the PR seems reasonable and everything would be fine if it was merged, just the POV of one person that happens to like ProcessMessage().

Concept -0 Let's say I'm reading a function called `ProcessBlock()` in `net_processing.cpp`: - Is this function called by `ProcessMessage()`? - Does `ProcessMessage()` do any set up before invoking `ProcessBlock()`? - Are there any other callers of `ProcessBlock()` and what are their expectations? - Are all the callers of `ProcessBlock()` in the process messages thread? These questions have to be answered when reading / modifying code and for all of the logic that lives in the `ProcessMessage()` ~switch statement these ambiguities don't exist. I think `ProcessBlock()` is a good example because it has multiple callers, and anyone reading it or modifying it should find them and think carefully about what they all do. That is a cost paid for by the reusability of `ProcessBlock()`. I think the main thing I don't share is the feeling that `ProcessMessage()` is too long. It's pretty flat, and there is ~0 state that lives outside of the `if(msg_type) {`, so I don't feel burdened by any of the rest of the function when I'm reading the logic for the message I'm interested in. Not trying to bikeshed, the PR seems reasonable and everything would be fine if it was merged, just the POV of one person that happens to like `ProcessMessage()`.
w0xlt commented 2026-06-19 07:33:45 +00:00 (Migrated from github.com)

@davidgumberg Fair point. I agree the cost is real when a helper has multiple callers like ProcessBlock(), because setup and caller assumptions become less local.

These extractions are different though: they are private, single-caller helpers from ProcessMessage(), called as Helper(...); return;, so the control flow remains simple.

The benefit I see is lock reasoning. ProcessMessage() has to carry the broad lock contract needed by all branches:

EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex, !m_most_recent_block_mutex,
                         !m_headers_presync_mutex, g_msgproc_mutex,
                         !m_tx_download_mutex)

After extraction, each handler states only what it actually needs. For example, ProcessGetAddr() requires only g_msgproc_mutex, while ProcessTx() requires g_msgproc_mutex, !m_peer_mutex, !m_tx_download_mutex.

So this does not add runtime safety by itself, but it makes the per-message lock contract more local and compiler-checked.

Besides that, ProcessMessage() arguably accumulates disproportionate responsibility, and this extraction pattern addresses that, though I agree this is a more subjective point.

@davidgumberg Fair point. I agree the cost is real when a helper has multiple callers like `ProcessBlock()`, because setup and caller assumptions become less local. These extractions are different though: they are private, single-caller helpers from `ProcessMessage()`, called as `Helper(...); return;`, so the control flow remains simple. The benefit I see is lock reasoning. `ProcessMessage()` has to carry the broad lock contract needed by all branches: ```cpp EXCLUSIVE_LOCKS_REQUIRED(!m_peer_mutex, !m_most_recent_block_mutex, !m_headers_presync_mutex, g_msgproc_mutex, !m_tx_download_mutex) ``` After extraction, each handler states only what it actually needs. For example, `ProcessGetAddr()` requires only `g_msgproc_mutex`, while `ProcessTx()` requires `g_msgproc_mutex`, `!m_peer_mutex`, `!m_tx_download_mutex`. So this does not add runtime safety by itself, but it makes the per-message lock contract more local and compiler-checked. Besides that, `ProcessMessage()` arguably accumulates disproportionate responsibility, and this extraction pattern addresses that, though I agree this is a more subjective point.
maflcko commented 2026-06-19 08:17:29 +00:00 (Migrated from github.com)

Let's say I'm reading a function called ProcessBlock() in net_processing.cpp:

* Is this function called by `ProcessMessage()`?

Should be easy to answer with 'yes', otherwise the function wouldn't sit in the peer manager impl?

* Does `ProcessMessage()` do any set up before invoking `ProcessBlock()`?

Edit: I'd say generally the goal should be to avoid setup, but here it should be obvious from the function signature, which is passed min_pow_checked (and other stuff). There is also the possibility of different message types doing different setup steps, one would have to read the handshake code either way, before and after this pull request.

* Are there any other callers of `ProcessBlock()` and what are their expectations?

Should be easy to answer by looking at the header: If the function is public in the header, it is called externally. If it is not in the header, then it is not called externally. Generally, I don't think any Process* handler was ever exposed in the header?

* Are all the callers of `ProcessBlock()` in the process messages thread?

Should be easy to answer with yes, because no process handler was ever exposed publicly. Also, it should be easy to verify with a single call to git grep.


Generally, I think the benefits here are limited, because devs generally know that at most a single message is handled in the large body (and thus no variables leak from one message handling block to the next). However, I think there is still a benefit in being able to review code changes with the git option git diff --function-context easier.

Previously, it would basically print the whole file, even if only a single line in a single message type handling was changed. At least for me this makes review harder because I have to scroll past the irrelevant white lines every time and risk missing a green or red line.

After this change, git diff --function-context nicely prints only the relevant context, so at least for me review would be easier. Also, parts of this file already use this pattern, so for consistency it also makes sense. So I am Concept +1, but this is just me, and maybe other people are using a different review flow?


@w0xlt Please don't @ in pull descriptions. If this pull was merged, it would lead to ping spam every time the merge is cherry-picked.

> Let's say I'm reading a function called `ProcessBlock()` in `net_processing.cpp`: > > * Is this function called by `ProcessMessage()`? Should be easy to answer with 'yes', otherwise the function wouldn't sit in the peer manager impl? > * Does `ProcessMessage()` do any set up before invoking `ProcessBlock()`? Edit: I'd say generally the goal should be to avoid setup, but here it should be obvious from the function signature, which is passed `min_pow_checked` (and other stuff). There is also the possibility of different message types doing different setup steps, one would have to read the handshake code either way, before and after this pull request. > * Are there any other callers of `ProcessBlock()` and what are their expectations? Should be easy to answer by looking at the header: If the function is public in the header, it is called externally. If it is not in the header, then it is not called externally. Generally, I don't think any `Process*` handler was ever exposed in the header? > * Are all the callers of `ProcessBlock()` in the process messages thread? Should be easy to answer with yes, because no process handler was ever exposed publicly. Also, it should be easy to verify with a single call to `git grep`. ---- Generally, I think the benefits here are limited, because devs generally know that at most a single message is handled in the large body (and thus no variables leak from one message handling block to the next). However, I think there is still a benefit in being able to review code changes with the git option `git diff --function-context` easier. Previously, it would basically print the whole file, even if only a single line in a single message type handling was changed. At least for me this makes review harder because I have to scroll past the irrelevant white lines every time and risk missing a green or red line. After this change, `git diff --function-context` nicely prints only the relevant context, so at least for me review would be easier. Also, parts of this file already use this pattern, so for consistency it also makes sense. So I am Concept +1, but this is just me, and maybe other people are using a different review flow? ----- @w0xlt Please don't `@` in pull descriptions. If this pull was merged, it would lead to ping spam every time the merge is cherry-picked.
davidgumberg commented 2026-06-25 02:15:32 +00:00 (Migrated from github.com)

Let's say I'm reading a function called ProcessBlock() in net_processing.cpp:

  • Is this function called by ProcessMessage()?

Should be easy to answer with 'yes', otherwise the function wouldn't sit in the peer manager impl?

I meant directly, this is basically the same point as the set-up one.

  • Does ProcessMessage() do any set up before invoking ProcessBlock()?

Edit: I'd say generally the goal should be to avoid setup, but here it should be obvious from the function signature, which is passed min_pow_checked (and other stuff). There is also the possibility of different message types doing different setup steps, one would have to read the handshake code either way, before and after this pull request.

Right, but after this PR you have to look in multiple places, even if there is only one caller that doesn't do any setup and it's ProcessMessage()

  • Are there any other callers of ProcessBlock() and what are their expectations?

Should be easy to answer by looking at the header: If the function is public in the header, it is called externally. If it is not in the header, then it is not called externally. Generally, I don't think any Process* handler was ever exposed in the header?

  • Are all the callers of ProcessBlock() in the process messages thread?

Should be easy to answer with yes, because no process handler was ever exposed publicly. Also, it should be easy to verify with a single call to git grep.

Yes, all of these questions can be answered quite easily by checking in one or two files and doing a grep or two, my point is that one doesn't have to just check the header and do an extra grep or two now.

e.g. I don't use git diff --function-context but it sounds like reviewing ProcessMessage() might be pretty annoying if one does that. Of course I could recommend that you use a different set of flags or a different tool, or just open another window with the function in it, but any of these "solutions" would add friction for you i.e. they suck in comparison to using the tool / workflow you already like and are used to.

That being said, it sounds like other contributors prefer the style of this PR to the style of master, and given that this is a stylistic question the thing that people prefer is definitely the thing that should happen.

> > Let's say I'm reading a function called `ProcessBlock()` in `net_processing.cpp`: > > > > * Is this function called by `ProcessMessage()`? > > > > Should be easy to answer with 'yes', otherwise the function wouldn't sit in the peer manager impl? I meant directly, this is basically the same point as the set-up one. > > > > > * Does `ProcessMessage()` do any set up before invoking `ProcessBlock()`? > > > > Edit: I'd say generally the goal should be to avoid setup, but here it should be obvious from the function signature, which is passed `min_pow_checked` (and other stuff). There is also the possibility of different message types doing different setup steps, one would have to read the handshake code either way, before and after this pull request. Right, but after this PR you **have** to look in multiple places, even if there is only one caller that doesn't do any setup and it's `ProcessMessage()` > > > > > * Are there any other callers of `ProcessBlock()` and what are their expectations? > > > > Should be easy to answer by looking at the header: If the function is public in the header, it is called externally. If it is not in the header, then it is not called externally. Generally, I don't think any `Process*` handler was ever exposed in the header? > > > > > * Are all the callers of `ProcessBlock()` in the process messages thread? > > > > Should be easy to answer with yes, because no process handler was ever exposed publicly. Also, it should be easy to verify with a single call to `git grep`. Yes, all of these questions can be answered quite easily by checking in one or two files and doing a grep or two, my point is that one doesn't have to just check the header and do an extra grep or two now. e.g. I don't use `git diff --function-context` but it sounds like reviewing `ProcessMessage()` might be pretty annoying if one does that. Of course I *could* recommend that you use a different set of flags or a different tool, or just open another window with the function in it, but any of these "solutions" would add friction for you i.e. they suck in comparison to using the tool / workflow you already like and are used to. That being said, it sounds like other contributors prefer the style of this PR to the style of master, and given that this is a stylistic question the thing that people prefer is definitely the thing that should happen.
DrahtBot commented 2026-07-25 12:12:23 +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).
w0xlt commented 2026-09-16 23:07:47 +00:00 (Migrated from github.com)

Rebased.
All suggestions addressed.

Rebased. All suggestions addressed.
DrahtBot commented 2026-09-22 20:46:46 +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).
l0rinc (Migrated from github.com) approved these changes 2026-09-23 02:48:34 +00:00
l0rinc (Migrated from github.com) left a comment

tested ACK ace762905f

Rebased and reimplemented the extractions, and generated missing test coverage locally to test that the before/after behavior doesn't change. I also compared the implementation with this series and reviewed each commit using --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space.
The change looks good to me. Thanks for this cleanup.

My inline suggestions are nonblocking, but since the extractions are straightforward, I think one or two cleanup and formatting commits after the move-only series would be reasonable.

The PR description also needs some updates: it still states "Seven handlers" although there are nine, omits ProcessCompactBlock() and ProcessVersion() from the list, and has a double comma after ProcessAddrs().

tested ACK ace762905f6f481d2b80f8b2613608908758b314 Rebased and reimplemented the extractions, and generated missing test coverage locally to test that the before/after behavior doesn't change. I also compared the implementation with this series and reviewed each commit using `--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`. The change looks good to me. Thanks for this cleanup. My inline suggestions are nonblocking, but since the extractions are straightforward, I think one or two cleanup and formatting commits after the move-only series would be reasonable. The PR description also needs some updates: it still states "Seven handlers" although there are nine, omits `ProcessCompactBlock()` and `ProcessVersion()` from the list, and has a double comma after `ProcessAddrs()`.
Lines 1915-1919
l0rinc (Migrated from github.com) commented 2026-09-23 01:42:55 +00:00

ace7629 move-only: Extract ProcessVersion() helper:

Seems to me this is basically just:

    if (!pfrom.IsInboundConn() && SetupAddressRelay(pfrom, peer)) {
> [ace7629](https://github.com/bitcoin/bitcoin/pull/35502/changes/ace762905f6f481d2b80f8b2613608908758b314) _move-only: Extract ProcessVersion() helper_: Seems to me this is basically just: ```suggestion if (!pfrom.IsInboundConn() && SetupAddressRelay(pfrom, peer)) { ```
l0rinc (Migrated from github.com) commented 2026-09-23 01:12:39 +00:00

0c9fdcd move-only: Extract ProcessGetHeaders() helper:

nit: this log changed because of __func__ returning "ProcessGetHeaders" intead of "ProcessMessage" - which is probably fine, give it's a debug log, but might be worth a mention

> [0c9fdcd](https://github.com/bitcoin/bitcoin/pull/35502/changes/0c9fdcd21e1da20192b7d808a02c281695311e28) _move-only: Extract ProcessGetHeaders() helper_: nit: this log changed because of `__func__` returning "ProcessGetHeaders" intead of "ProcessMessage" - which is probably fine, give it's a debug log, but might be worth a mention
l0rinc (Migrated from github.com) commented 2026-09-23 01:13:28 +00:00

0c9fdcd move-only: Extract ProcessGetHeaders() helper:

nit: in a separate commit consider reformatting these, we shouldn't add new code that's off from the start

> [0c9fdcd](https://github.com/bitcoin/bitcoin/pull/35502/changes/0c9fdcd21e1da20192b7d808a02c281695311e28) _move-only: Extract ProcessGetHeaders() helper_: nit: in a separate commit consider reformatting these, we shouldn't add new code that's off from the start
Lines 4137-4154
l0rinc (Migrated from github.com) commented 2026-09-23 01:33:00 +00:00

0e211e5 move-only: Extract ProcessCompactBlock() helper:

indentation is weird here, in a cleanup commit at the end we should normalize these

> [0e211e5](https://github.com/bitcoin/bitcoin/pull/35502/changes/0e211e593b82d19236d7d09866562c13116f5659) _move-only: Extract ProcessCompactBlock() helper_: indentation is weird here, in a cleanup commit at the end we should normalize these
l0rinc (Migrated from github.com) commented 2026-09-23 01:22:12 +00:00

c17c3d5 move-only: Extract ProcessGetAddr() helper:

Note: these trailing returns allow us to cleanly extract the helpers since the previous return values short-circuited the whole external method - while after extraction they only cut the extracted method short.

> [c17c3d5](https://github.com/bitcoin/bitcoin/pull/35502/changes/c17c3d526b7f4a3b921a8cc443e1adee0f397503) _move-only: Extract ProcessGetAddr() helper_: Note: these trailing `returns` allow us to cleanly extract the helpers since the previous `return` values short-circuited the whole external method - while after extraction they only cut the extracted method short.
l0rinc (Migrated from github.com) commented 2026-09-23 01:29:27 +00:00

6bba1fc move-only: Extract ProcessSendTxRcncl() helper:

Can be return after the move for consistency, it's confusing to have both break and return (doing the same in this context)

> [6bba1fc](https://github.com/bitcoin/bitcoin/pull/35502/changes/6bba1fc96b4aa6a80a84f1654ea4994958e57414) _move-only: Extract ProcessSendTxRcncl() helper_: Can be `return` after the move for consistency, it's confusing to have both `break` and `return` (doing the same in this context)
w0xlt (Migrated from github.com) reviewed 2026-09-23 21:06:51 +00:00
w0xlt (Migrated from github.com) commented 2026-09-23 21:06:51 +00:00

Thanks. Done.

Thanks. Done.
w0xlt (Migrated from github.com) reviewed 2026-09-23 21:07:00 +00:00
w0xlt (Migrated from github.com) commented 2026-09-23 21:07:00 +00:00

Thanks. Done.

Thanks. Done.
w0xlt (Migrated from github.com) reviewed 2026-09-23 21:07:04 +00:00
w0xlt (Migrated from github.com) commented 2026-09-23 21:07:04 +00:00

Thanks. Done.

Thanks. Done.
w0xlt (Migrated from github.com) reviewed 2026-09-23 21:07:08 +00:00
w0xlt (Migrated from github.com) commented 2026-09-23 21:07:08 +00:00

Thanks. Done.

Thanks. Done.
w0xlt (Migrated from github.com) reviewed 2026-09-23 21:07:12 +00:00
Lines 4137-4154
w0xlt (Migrated from github.com) commented 2026-09-23 21:07:12 +00:00

Thanks. Done.

Thanks. Done.
w0xlt (Migrated from github.com) reviewed 2026-09-23 21:07:17 +00:00
Lines 1915-1919
w0xlt (Migrated from github.com) commented 2026-09-23 21:07:17 +00:00

Thanks. Done.

Thanks. Done.
l0rinc commented 2026-09-24 04:13:05 +00:00 (Migrated from github.com)

retested ACK cf0c89d6dc

This remains a straightforward refactor.
Since my last ACK, the changes are mostly minimal reformatting and the equivalent break→return and send_getaddr cleanups as suggested.

retested ACK cf0c89d6dc895ea0323e7680d6fe6c394fe25288 This remains a straightforward refactor. Since my last ACK, the changes are mostly minimal reformatting and the equivalent `break`→`return` and `send_getaddr` cleanups as suggested.
pablomartin4btc (Migrated from github.com) reviewed 2026-09-24 15:06:06 +00:00
pablomartin4btc (Migrated from github.com) left a comment

ACK cf0c89d6dc

Thanks for taking my suggestion to also extract ProcessCompactBlock() and ProcessVersion().

Also, since my last review, feedback from @l0rinc has been addressed and a new cleanup commit has been added.

ACK cf0c89d6dc895ea0323e7680d6fe6c394fe25288 Thanks for taking my suggestion to also extract `ProcessCompactBlock()` and `ProcessVersion()`. Also, since my last review, feedback from @l0rinc has been addressed and a new cleanup commit has been added.
First-time contributor

Earlier concerns remain unresolved; see the Run archive linked from the Review report.

No verified findings are available from this review.

Review coverage was incomplete.


Reviewed: e7120dc7002f · Review report · Previous reports

permalink

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:7eebed8027c96ac27bcd79eeb7a88e35799cd96eb8fbacf34d3257986a959f64:cdc1bd61213c9363d5bb4c7b7ee073ccfd6fecdafbb2c4c18d9d9e031a6afcf8 --> <!-- ralph-base:c68583ab5a886b6add45a8607d762b71678c748c --> <!-- ralph-head:e7120dc7002fd91c061df45e58d527fb03dd16e3 --> <!-- ralph-case:a1387d312bea1ebce1b73a5f4dfc1c9e30f2ccc2150b27d5c0ba24ef321d5c5b --> Earlier concerns remain unresolved; see the Run archive linked from the Review report. No verified findings are available from this review. Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`e7120dc7002f`](<https://git.fish.foo/bitcoin/bitcoin/commit/e7120dc7002fd91c061df45e58d527fb03dd16e3>) · [Review report](<https://review.fish.foo/report/35502-e7120dc7002fd91c061df45e58d527fb03dd16e3-2539-4.html>) · [Previous reports](<https://review.fish.foo/traces/35502/>) [permalink](<https://review.fish.foo/report/35502-e7120dc7002fd91c061df45e58d527fb03dd16e3-2539-4.html>)
DrahtBot commented 2026-10-05 10:21:38 +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).
w0xlt commented 2026-10-08 23:25:57 +00:00 (Migrated from github.com)

Rebased

Rebased
pablomartin4btc (Migrated from github.com) reviewed 2026-10-09 00:55:41 +00:00
pablomartin4btc (Migrated from github.com) left a comment

re-ACK 87ca532651

Confirmed pure rebase since my last review.
git range-diff \
  $(git merge-base cf0c89d6dc895ea0323e7680d6fe6c394fe25288 origin/master)..cf0c89d6dc895ea0323e7680d6fe6c394fe25288 \
  $(git merge-base 87ca532651b314dc949089f9f0b0c700128f877f origin/master)..87ca532651b314dc949089f9f0b0c700128f877f
  | sed 's/^    //'

 1:  c17c3d526b =  1:  ab6ff42a3a move-only: Extract ProcessGetAddr() helper
 2:  57c32028df =  2:  62de898c3d move-only: Extract ProcessGetDataMessage() helper
 3:  116b45b5c8 =  3:  7e11954c3f move-only: Extract ProcessGetBlocks() helper
 4:  01c65dd796 =  4:  f1963a6f5d move-only: Extract ProcessGetHeaders() helper
 5:  31a5f7c493 =  5:  4067fbd7fd move-only: Extract ProcessInv() helper
 6:  0b80c046f9 =  6:  337499bc13 move-only: Extract ProcessSendTxRcncl() helper
 7:  b66c398623 !  7:  3f2ff22340 move-only: Extract ProcessTx() helper
@@ src/net_processing.cpp: void PeerManagerImpl::ProcessInv(CNode& pfrom, Peer& pee
 +    const uint256& hash = peer.m_wtxid_relay ? wtxid.ToUint256() : txid.ToUint256();
 +    AddKnownTx(peer, hash);
 +
-+    if (const auto num_broadcasted{m_tx_for_private_broadcast.Remove(ptx)}) {
++    if (m_tx_for_private_broadcast.MarkResolved(ptx)) {
 +        LogDebug(BCLog::PRIVBROADCAST, "Received our privately broadcast transaction (txid=%s) from the "
-+                                       "network from %s; stopping private broadcast attempts",
++                                       "network from %s",
 +                 txid.ToString(), pfrom.LogPeer());
-+        if (NUM_PRIVATE_BROADCAST_PER_TX > num_broadcasted.value()) {
-+            // Not all of the initial NUM_PRIVATE_BROADCAST_PER_TX connections were needed.
-+            // Tell CConnman it does not need to start the remaining ones.
-+            m_connman.m_private_broadcast.NumToOpenSub(NUM_PRIVATE_BROADCAST_PER_TX - num_broadcasted.value());
-+        }
 +    }
 +
 +    LOCK2(cs_main, m_tx_download_mutex);
@@ src/net_processing.cpp: void PeerManagerImpl::ProcessInv(CNode& pfrom, Peer& pee
 +            // the node to function as a gateway for nodes hidden behind it.
 +            if (!m_mempool.exists(txid)) {
 +                LogInfo("Not relaying non-mempool transaction %s (wtxid=%s) from forcerelay peer=%d\n",
-+                        txid.ToString(), wtxid.ToString(), pfrom.GetId());
++                          txid.ToString(), wtxid.ToString(), pfrom.GetId());
 +            } else {
 +                LogInfo("Force relaying tx %s (wtxid=%s) from peer=%d\n",
-+                        txid.ToString(), wtxid.ToString(), pfrom.GetId());
++                          txid.ToString(), wtxid.ToString(), pfrom.GetId());
 +                InitiateTxBroadcastToAll(wtxid);
 +            }
 +        }
@@ src/net_processing.cpp: void PeerManagerImpl::ProcessMessage(Peer& peer, CNode&
 -        const uint256& hash = peer.m_wtxid_relay ? wtxid.ToUint256() : txid.ToUint256();
 -        AddKnownTx(peer, hash);
 -
--        if (const auto num_broadcasted{m_tx_for_private_broadcast.Remove(ptx)}) {
+-        if (m_tx_for_private_broadcast.MarkResolved(ptx)) {
 -            LogDebug(BCLog::PRIVBROADCAST, "Received our privately broadcast transaction (txid=%s) from the "
--                                           "network from %s; stopping private broadcast attempts",
+-                                           "network from %s",
 -                     txid.ToString(), pfrom.LogPeer());
--            if (NUM_PRIVATE_BROADCAST_PER_TX > num_broadcasted.value()) {
--                // Not all of the initial NUM_PRIVATE_BROADCAST_PER_TX connections were needed.
--                // Tell CConnman it does not need to start the remaining ones.
--                m_connman.m_private_broadcast.NumToOpenSub(NUM_PRIVATE_BROADCAST_PER_TX - num_broadcasted.value());
--            }
 -        }
 -
 -        LOCK2(cs_main, m_tx_download_mutex);
 8:  5f71554b39 =  8:  d4735b99ca move-only: Extract ProcessCompactBlock() helper
 9:  dabe1c4d77 !  9:  27e1753117 move-only: Extract ProcessVersion() helper
@@ src/net_processing.cpp: private:
 +    void ProcessVersion(CNode& pfrom, Peer& peer, const std::string& msg_type, DataStream& vRecv)
 +        EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex);
 +
-     /** Send a ping message every PING_INTERVAL or if requested via RPC (peer.m_ping_queued is true).
-      *  May mark the peer to be disconnected if a ping has timed out.
-      *  We use mockable time for ping timeouts, so setmocktime may cause pings
+     /** Send a ping message every PING_INTERVAL or if requested via RPC (peer.m_ping_queued is true). */
+     void MaybeSendPing(CNode& node_to, Peer& peer, NodeClock::time_point now);
+ 
 @@ src/net_processing.cpp: void PeerManagerImpl::PushNodeVersion(CNode& pnode, const Peer& peer)
          my_tx_relay, pnode.GetId());
  }
10:  cf0c89d6dc = 10:  87ca532651 refactor: Clean up extracted message handlers

8 of 10 commits are byte-identical; the other 2 (ProcessTx(), ProcessVersion()) differ only in incidental context lines absorbed from unrelated upstream changes (private-broadcast internals, a ping-timeout-related doc comment) — nothing intentional added or removed.

re-ACK 87ca532651b314dc949089f9f0b0c700128f877f <details> <summary>Confirmed pure rebase since my last review.</summary> <br> ``` git range-diff \ $(git merge-base cf0c89d6dc895ea0323e7680d6fe6c394fe25288 origin/master)..cf0c89d6dc895ea0323e7680d6fe6c394fe25288 \ $(git merge-base 87ca532651b314dc949089f9f0b0c700128f877f origin/master)..87ca532651b314dc949089f9f0b0c700128f877f | sed 's/^ //' ``` ```diff 1: c17c3d526b = 1: ab6ff42a3a move-only: Extract ProcessGetAddr() helper 2: 57c32028df = 2: 62de898c3d move-only: Extract ProcessGetDataMessage() helper 3: 116b45b5c8 = 3: 7e11954c3f move-only: Extract ProcessGetBlocks() helper 4: 01c65dd796 = 4: f1963a6f5d move-only: Extract ProcessGetHeaders() helper 5: 31a5f7c493 = 5: 4067fbd7fd move-only: Extract ProcessInv() helper 6: 0b80c046f9 = 6: 337499bc13 move-only: Extract ProcessSendTxRcncl() helper 7: b66c398623 ! 7: 3f2ff22340 move-only: Extract ProcessTx() helper @@ src/net_processing.cpp: void PeerManagerImpl::ProcessInv(CNode& pfrom, Peer& pee + const uint256& hash = peer.m_wtxid_relay ? wtxid.ToUint256() : txid.ToUint256(); + AddKnownTx(peer, hash); + -+ if (const auto num_broadcasted{m_tx_for_private_broadcast.Remove(ptx)}) { ++ if (m_tx_for_private_broadcast.MarkResolved(ptx)) { + LogDebug(BCLog::PRIVBROADCAST, "Received our privately broadcast transaction (txid=%s) from the " -+ "network from %s; stopping private broadcast attempts", ++ "network from %s", + txid.ToString(), pfrom.LogPeer()); -+ if (NUM_PRIVATE_BROADCAST_PER_TX > num_broadcasted.value()) { -+ // Not all of the initial NUM_PRIVATE_BROADCAST_PER_TX connections were needed. -+ // Tell CConnman it does not need to start the remaining ones. -+ m_connman.m_private_broadcast.NumToOpenSub(NUM_PRIVATE_BROADCAST_PER_TX - num_broadcasted.value()); -+ } + } + + LOCK2(cs_main, m_tx_download_mutex); @@ src/net_processing.cpp: void PeerManagerImpl::ProcessInv(CNode& pfrom, Peer& pee + // the node to function as a gateway for nodes hidden behind it. + if (!m_mempool.exists(txid)) { + LogInfo("Not relaying non-mempool transaction %s (wtxid=%s) from forcerelay peer=%d\n", -+ txid.ToString(), wtxid.ToString(), pfrom.GetId()); ++ txid.ToString(), wtxid.ToString(), pfrom.GetId()); + } else { + LogInfo("Force relaying tx %s (wtxid=%s) from peer=%d\n", -+ txid.ToString(), wtxid.ToString(), pfrom.GetId()); ++ txid.ToString(), wtxid.ToString(), pfrom.GetId()); + InitiateTxBroadcastToAll(wtxid); + } + } @@ src/net_processing.cpp: void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& - const uint256& hash = peer.m_wtxid_relay ? wtxid.ToUint256() : txid.ToUint256(); - AddKnownTx(peer, hash); - -- if (const auto num_broadcasted{m_tx_for_private_broadcast.Remove(ptx)}) { +- if (m_tx_for_private_broadcast.MarkResolved(ptx)) { - LogDebug(BCLog::PRIVBROADCAST, "Received our privately broadcast transaction (txid=%s) from the " -- "network from %s; stopping private broadcast attempts", +- "network from %s", - txid.ToString(), pfrom.LogPeer()); -- if (NUM_PRIVATE_BROADCAST_PER_TX > num_broadcasted.value()) { -- // Not all of the initial NUM_PRIVATE_BROADCAST_PER_TX connections were needed. -- // Tell CConnman it does not need to start the remaining ones. -- m_connman.m_private_broadcast.NumToOpenSub(NUM_PRIVATE_BROADCAST_PER_TX - num_broadcasted.value()); -- } - } - - LOCK2(cs_main, m_tx_download_mutex); 8: 5f71554b39 = 8: d4735b99ca move-only: Extract ProcessCompactBlock() helper 9: dabe1c4d77 ! 9: 27e1753117 move-only: Extract ProcessVersion() helper @@ src/net_processing.cpp: private: + void ProcessVersion(CNode& pfrom, Peer& peer, const std::string& msg_type, DataStream& vRecv) + EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex); + - /** Send a ping message every PING_INTERVAL or if requested via RPC (peer.m_ping_queued is true). - * May mark the peer to be disconnected if a ping has timed out. - * We use mockable time for ping timeouts, so setmocktime may cause pings + /** Send a ping message every PING_INTERVAL or if requested via RPC (peer.m_ping_queued is true). */ + void MaybeSendPing(CNode& node_to, Peer& peer, NodeClock::time_point now); + @@ src/net_processing.cpp: void PeerManagerImpl::PushNodeVersion(CNode& pnode, const Peer& peer) my_tx_relay, pnode.GetId()); } 10: cf0c89d6dc = 10: 87ca532651 refactor: Clean up extracted message handlers ``` </details> 8 of 10 commits are byte-identical; the other 2 (`ProcessTx()`, `ProcessVersion()`) differ only in incidental context lines absorbed from unrelated upstream changes (private-broadcast internals, a ping-timeout-related doc comment) — nothing intentional added or removed.
pablomartin4btc (Migrated from github.com) reviewed 2026-10-20 00:35:25 +00:00
pablomartin4btc (Migrated from github.com) commented 2026-10-20 00:35:25 +00:00

nit: as @maflcko suggested in https://github.com/bitcoin/bitcoin/pull/35522#issuecomment-6144362450, we shouldn't be using __func__ in the logs. I've checked that the logging macros already capture the calling function via SourceLocation, which is available on demand with -logsourcelocations (e.g., tests enable it unconditionally — see setup_common.cpp and test_node.py). Perhaps you can add a prepare commit that removes the prefix from the debug logs used in ProcessMessage().

            LogDebug(BCLog::NET, "ignoring request from peer=%i for old block header that isn't in the main chain\n", pfrom.GetId());
nit: as @maflcko suggested in https://github.com/bitcoin/bitcoin/pull/35522#issuecomment-6144362450, we shouldn't be using `__func__` in the logs. I've checked that the logging macros already capture the calling function via `SourceLocation`, which is available on demand with `-logsourcelocations` (e.g., tests enable it unconditionally — see `setup_common.cpp` and `test_node.py`). Perhaps you can add a prepare commit that removes the prefix from the debug logs used in `ProcessMessage()`. ```suggestion LogDebug(BCLog::NET, "ignoring request from peer=%i for old block header that isn't in the main chain\n", pfrom.GetId()); ```
DrahtBot commented 2026-10-20 04:02:54 +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).
w0xlt (Migrated from github.com) reviewed 2026-11-05 22:57:36 +00:00
w0xlt (Migrated from github.com) commented 2026-11-05 22:57:36 +00:00

Thanks, done in 4f7f24d813 as a prepare commit, so the ProcessGetHeaders() move is now move-only.

Thanks, done in 4f7f24d813 as a prepare commit, so the ProcessGetHeaders() move is now move-only.
w0xlt commented 2026-11-05 22:57:49 +00:00 (Migrated from github.com)

Rebased.

Rebased.
l0rinc commented 2026-11-06 08:33:43 +00:00 (Migrated from github.com)

rereACK 0e3c1a2de0

I checked each commit manually (inlined the content back and checked the diff). The extractions are clean code moves, with a minimal log cleanup in the first commit and formatting and equivalent control-flow cleanups in the last.

rereACK 0e3c1a2de03596cfaf5de25cc052b96ef88728af I checked each commit manually (inlined the content back and checked the diff). The extractions are clean code moves, with a minimal log cleanup in the first commit and formatting and equivalent control-flow cleanups in the last.
DrahtBot commented 2026-11-06 11:31:24 +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 (Migrated from github.com) reviewed 2026-11-09 03:14:06 +00:00
pablomartin4btc (Migrated from github.com) left a comment

re-ACK 0e3c1a2de0

Thanks for taking the suggestion dropping __func__ from debug log (in prepare commit).

Please rebase due to #36752.

re-ACK 0e3c1a2de03596cfaf5de25cc052b96ef88728af Thanks for taking the [suggestion](https://github.com/bitcoin/bitcoin/pull/35502#discussion_r4320292152) dropping `__func__` from debug log (in prepare commit). Please rebase due to #36752.
vasild (Migrated from github.com) approved these changes 2026-11-10 14:01:50 +00:00
vasild (Migrated from github.com) left a comment

ACK 0e3c1a2de0 (modulo the conflict with https://github.com/bitcoin/bitcoin/pull/36752)

Long overdue, thank you!

Show Signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

ACK 0e3c1a2de03596cfaf5de25cc052b96ef88728af (modulo the conflict with https://github.com/bitcoin/bitcoin/pull/36752)

Long overdue, thank you!
-----BEGIN PGP SIGNATURE-----

iQRPBAEBCAA5FiEE5k2NRWFNsHVF2czBVN8G9ktVy78FAmrzI6obFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwzAAoJEFTfBvZLVcu/ceQf/37r2DIZSTmzPhgHtvpw
ZmrfCLgPlHYdT+8NbB+TBejOCX2JDqpvB9gAhDhZgt+mLEwQNMvnjijzsLifiVDw
JDpK6Kffm5dSJcmZYe+pmM7901mQngXALoe03nEnjiQkgW0TbA8LdmfJEDFVX8Sz
pVdxGYyQCsn4uh8xfmFu8FbQ5/UlEwmsF087RZsalseYkRPORtzCZaHnSuGE7zLp
UmgWRQX0l1DLcmZtZw74OZRWWBfgnwBvv8FESp4L+g6aGbxLE2dMSeaIfz99yo+n
VUM/AzvMd2mbSc/Q+E8/+UNkSYJoAtsihjyk/7fW1BujlQ7dapM0S+4eNgeeqNEM
cnAoD25QhHwgeeumGVnLxSCW95K6QDksDEmNYYKeA6vPUzQOSfgkHYY0EKSsH7fH
eGg/vCEZBr6kel46dlsCCnRM/EMwOio+u2Gg9W19s4HBd/crLi0uhAZD5TFhkWiJ
wau49RVhW/OmxF0pxxlKMlqhXouBM5mL1Rtn6ZfIKQxMGfHScKdPZ5UBY7YCvXBL
sQ9LXVJwWaS6fca956j7ypc0KErKtUckUBWFDIt2yWgMt92InFCl0GSDiSwvXMAv
X5SroFtsMu8IyQ1P4OW5N6PUq419QWt6T65H3pgSEl9FbvFLiMo4NbnGXJedH9rk
9aYFVWirMpQS6lXXrHwSnECmVSFU8lKwPh4ZW7TbgSNqI2kQvv5EA9OgbXZrZD4h
Htpm71ktSftD744l0bAJqKU4zub+vQBJIuT/C33x6OaSXAgVSFhXouLD4JdRK+r9
3UMOQ5ytBLEETAelTmkJkBTFkCfkgtGfngf4eiIJYR0sCcLffHV1bhC/kLYvrRy6
/D7QApBv7/vO14G5bYKTetqmLo9fKSrtFhuORk9MK8FEOjjGkmYWO98yh1VIprEt
aFCGXI0mJGnmdKFNNpzNMr6o1GSKM2NN72OTLFduOCtDaKMKxgUpZo21bVjoJ3fZ
HlWE0bvjbzFachuDZoi0ARE/ehHeBdlXN1NhqOuEBKc2Rx0pl9+3YFjygApr9uff
wq+acCeWScahGNKgq6lJ2uKxWwZyknNpkug/uNEsIaaZJIZpHCDbnSzMuhPiwua+
ity/v38OWb7WSyFjpc/5dF/GKxJ9KEbL4Z2KXGmd0ztTmATGGaq41JT7I9Rce5Ad
PS/2pRQGbFLJf0PpW4yIhSY00b7CFqvf58bc4hbqb1K+1CvFBNSCGuIRszTeHm4z
dxQZQSX0WmnCkiDYEpznRplIhDcFK6UdvaM/stz1KHJNrrHZHk/8O3CTMF5q2Pvr
GWriLYDZYgkJ0jqWHvPhwqPbqBhjdu6kkfPK5bbQaI5Qijn4a0k2DB897wEXd/mC
j8Y=
=FF1a
-----END PGP SIGNATURE-----

vasild's public key is on openpgp.org

ACK 0e3c1a2de03596cfaf5de25cc052b96ef88728af (modulo the conflict with https://github.com/bitcoin/bitcoin/pull/36752) Long overdue, thank you! <details> <summary>Show Signature</summary> ``` -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 ACK 0e3c1a2de03596cfaf5de25cc052b96ef88728af (modulo the conflict with https://github.com/bitcoin/bitcoin/pull/36752) Long overdue, thank you! -----BEGIN PGP SIGNATURE----- iQRPBAEBCAA5FiEE5k2NRWFNsHVF2czBVN8G9ktVy78FAmrzI6obFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwzAAoJEFTfBvZLVcu/ceQf/37r2DIZSTmzPhgHtvpw ZmrfCLgPlHYdT+8NbB+TBejOCX2JDqpvB9gAhDhZgt+mLEwQNMvnjijzsLifiVDw JDpK6Kffm5dSJcmZYe+pmM7901mQngXALoe03nEnjiQkgW0TbA8LdmfJEDFVX8Sz pVdxGYyQCsn4uh8xfmFu8FbQ5/UlEwmsF087RZsalseYkRPORtzCZaHnSuGE7zLp UmgWRQX0l1DLcmZtZw74OZRWWBfgnwBvv8FESp4L+g6aGbxLE2dMSeaIfz99yo+n VUM/AzvMd2mbSc/Q+E8/+UNkSYJoAtsihjyk/7fW1BujlQ7dapM0S+4eNgeeqNEM cnAoD25QhHwgeeumGVnLxSCW95K6QDksDEmNYYKeA6vPUzQOSfgkHYY0EKSsH7fH eGg/vCEZBr6kel46dlsCCnRM/EMwOio+u2Gg9W19s4HBd/crLi0uhAZD5TFhkWiJ wau49RVhW/OmxF0pxxlKMlqhXouBM5mL1Rtn6ZfIKQxMGfHScKdPZ5UBY7YCvXBL sQ9LXVJwWaS6fca956j7ypc0KErKtUckUBWFDIt2yWgMt92InFCl0GSDiSwvXMAv X5SroFtsMu8IyQ1P4OW5N6PUq419QWt6T65H3pgSEl9FbvFLiMo4NbnGXJedH9rk 9aYFVWirMpQS6lXXrHwSnECmVSFU8lKwPh4ZW7TbgSNqI2kQvv5EA9OgbXZrZD4h Htpm71ktSftD744l0bAJqKU4zub+vQBJIuT/C33x6OaSXAgVSFhXouLD4JdRK+r9 3UMOQ5ytBLEETAelTmkJkBTFkCfkgtGfngf4eiIJYR0sCcLffHV1bhC/kLYvrRy6 /D7QApBv7/vO14G5bYKTetqmLo9fKSrtFhuORk9MK8FEOjjGkmYWO98yh1VIprEt aFCGXI0mJGnmdKFNNpzNMr6o1GSKM2NN72OTLFduOCtDaKMKxgUpZo21bVjoJ3fZ HlWE0bvjbzFachuDZoi0ARE/ehHeBdlXN1NhqOuEBKc2Rx0pl9+3YFjygApr9uff wq+acCeWScahGNKgq6lJ2uKxWwZyknNpkug/uNEsIaaZJIZpHCDbnSzMuhPiwua+ ity/v38OWb7WSyFjpc/5dF/GKxJ9KEbL4Z2KXGmd0ztTmATGGaq41JT7I9Rce5Ad PS/2pRQGbFLJf0PpW4yIhSY00b7CFqvf58bc4hbqb1K+1CvFBNSCGuIRszTeHm4z dxQZQSX0WmnCkiDYEpznRplIhDcFK6UdvaM/stz1KHJNrrHZHk/8O3CTMF5q2Pvr GWriLYDZYgkJ0jqWHvPhwqPbqBhjdu6kkfPK5bbQaI5Qijn4a0k2DB897wEXd/mC j8Y= =FF1a -----END PGP SIGNATURE----- ``` vasild's public key is [on openpgp.org](https://keys.openpgp.org/vks/v1/by-fingerprint/850E138BA9C0923881DFD55FCE712013582E2230) </details>
l0rinc commented 2026-11-11 19:05:25 +00:00 (Migrated from github.com)

reACK e7120dc700

Only the ProcessSendTxRcncl() extraction changed in the rebase after #36752.
Small description nits: line count and "no behavior change" need some minor edits.

@sedited, could we prioritize these moves to spare the author repeated rebases?

reACK e7120dc7002fd91c061df45e58d527fb03dd16e3 Only the `ProcessSendTxRcncl()` extraction changed in the rebase after #36752. Small description nits: line count and "no behavior change" need some minor edits. @sedited, could we prioritize these moves to spare the author repeated rebases?
w0xlt commented 2026-11-11 19:26:08 +00:00 (Migrated from github.com)

@l0rinc Thanks for the re-review. Both are fixed in the description: the line count is now ~1500, and the "no behavior change" sentence now mentions the debug log differences.

@l0rinc Thanks for the re-review. Both are fixed in the description: the line count is now ~1500, and the "no behavior change" sentence now mentions the debug log differences.
maflcko commented 2026-11-12 10:07:51 +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".
w0xlt commented 2026-11-12 18:31:58 +00:00 (Migrated from github.com)

Makes sense, thanks @maflcko.
For tracking: I assume this is 36521?

Makes sense, thanks @maflcko. For tracking: I assume this is 36521?
vasild (Migrated from github.com) approved these changes 2026-11-23 15:35:01 +00:00
vasild (Migrated from github.com) left a comment

ACK e7120dc700

This conflicts with a reviewed pull that is marked for possible backport

Which one?

For tracking: I assume this is 36521?

https://github.com/bitcoin/bitcoin/pull/36521 is closed and not for backport?

Show Signature
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

ACK e7120dc7002fd91c061df45e58d527fb03dd16e3

> This conflicts with a reviewed pull that is marked for possible backport

Which one?

> For tracking: I assume this is 36521?

https://github.com/bitcoin/bitcoin/pull/36521 is closed and not for backport?
-----BEGIN PGP SIGNATURE-----

iQRPBAEBCAA5FiEE5k2NRWFNsHVF2czBVN8G9ktVy78FAmsEXP4bFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwzAAoJEFTfBvZLVcu/46kf/27Q7MzK/tWsZs9MA//g
2bczSWSBt2lZ96azMH5lVxslrqRL6vSEw3Uf0uFdtqJtp3BC40cyPlhMdu2jIvda
wYyeM3QFs6WkE60OS6c/LmI+IvBAv/91tkDS9OK3hCRE/bduc5hgmuPp9QxaZLPF
HLak+2uZlcaqpGegzq7buO3/o5EevD808ks2Ek1cEJeRV5t8BGP/pnfKytTpfMYG
+7Cq2m7DomiLsJRUtdjxR/iTWvTKMVQ9Qj+gvkg51SuTqIveFHHOiR7mnTWLPjnS
X5fxRybRukKsnDALCJsWqL3AQoeLtjSjpcWhSHbRjSZjrbET7TEQIzac7ds0Bw54
YzHgCd6NELXn+g53x7UGd2kjHca0ftJPEMZG0SXr4V29or4tb4xqvbCfa641CxwV
mDFOfyhQZTD0N1uSlC8VnKoEOJphGpExDhC849QUAif1uMPARwslqquIBOOD6BnN
joFg7hTjxP82e2b1gjSUnJcE152p8qJUXmGTBpGV/XHsn9GuZ71lSFYGXwNou/VA
l4hEUmvkwZOsxIvjftcngBq4skUNpKUDX7oEwo2X+ie1r1aMXDnNZhVqO5rZuJLt
YCymzT3IRGASwptDouXFw67GqS88Y5GymTVi72TxNFnVu17/jGQnXUYHqx+sxcr2
4ziYMzMYcD1Mk4Q4qSHtWRmOzdluIDw+Sh3Qm8OGcuQNTXEc1cdDneGJzB+shMMn
TV23Yd5lf2QbjwQ1hE/BJFClsrGdTpl8j/VXvWUsMTHqKP3HugEbfB/SMipiCxqC
dDZD8xu7S+D7Q1wy2oBxb1fGW25Oi4d4DaunhOmK14NO7jOFvb9utk+CbCS2cYmj
wXwZnkG87tlsEGd6MkLDVTQyJUUc0jEDE0F94OInfdqwr9MopN6bQbilwyZ8LPKn
m7Hm1RAKt+/EQBWwK2tqco/v/lcGOREEpESL+xT1pLurPnyoGRo0wuKFK1Qpk2WR
PI7TTN5dZfEhSH4JgmLJLrn/S2BZMxLURGVcrcQWzBe/ORHE65aenTPS6sHTa3nM
xM8vN4rUNL39bmZuQxcJUOrFpX3PfriKj8pzKP7aHh1W8KHdtppPBTOKlReVCG0n
LA1LKUBvcx4+sX2GJh+iAIFQFCq6DJ5bLNeXsqUSWMFN//E+FZ0cJzKxqAfMDxwl
IDs/GAmTczQpyTIyrVAFDTAEjDVujXHTh4UrgLizH6wvl7Cnv/Tca1R43iRao2iD
FrQSVtTlMKJeKR8dSXOBViGGWgjmv1YbXJ9mc32kP7rko7h3TlSSzQAITN7H9xEQ
j0oWqO2IgVGbHs6lvzoZSkEuibbKJu7IwQe/X2dEHOwzX7CU3nGDw6cSPfbSkqwn
wxw=
=gy8S
-----END PGP SIGNATURE-----

vasild's public key is on openpgp.org

ACK e7120dc7002fd91c061df45e58d527fb03dd16e3 > This conflicts with a reviewed pull that is marked for possible backport Which one? > For tracking: I assume this is 36521? https://github.com/bitcoin/bitcoin/pull/36521 is closed and not for backport? <details> <summary>Show Signature</summary> ``` -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 ACK e7120dc7002fd91c061df45e58d527fb03dd16e3 > This conflicts with a reviewed pull that is marked for possible backport Which one? > For tracking: I assume this is 36521? https://github.com/bitcoin/bitcoin/pull/36521 is closed and not for backport? -----BEGIN PGP SIGNATURE----- iQRPBAEBCAA5FiEE5k2NRWFNsHVF2czBVN8G9ktVy78FAmsEXP4bFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwzAAoJEFTfBvZLVcu/46kf/27Q7MzK/tWsZs9MA//g 2bczSWSBt2lZ96azMH5lVxslrqRL6vSEw3Uf0uFdtqJtp3BC40cyPlhMdu2jIvda wYyeM3QFs6WkE60OS6c/LmI+IvBAv/91tkDS9OK3hCRE/bduc5hgmuPp9QxaZLPF HLak+2uZlcaqpGegzq7buO3/o5EevD808ks2Ek1cEJeRV5t8BGP/pnfKytTpfMYG +7Cq2m7DomiLsJRUtdjxR/iTWvTKMVQ9Qj+gvkg51SuTqIveFHHOiR7mnTWLPjnS X5fxRybRukKsnDALCJsWqL3AQoeLtjSjpcWhSHbRjSZjrbET7TEQIzac7ds0Bw54 YzHgCd6NELXn+g53x7UGd2kjHca0ftJPEMZG0SXr4V29or4tb4xqvbCfa641CxwV mDFOfyhQZTD0N1uSlC8VnKoEOJphGpExDhC849QUAif1uMPARwslqquIBOOD6BnN joFg7hTjxP82e2b1gjSUnJcE152p8qJUXmGTBpGV/XHsn9GuZ71lSFYGXwNou/VA l4hEUmvkwZOsxIvjftcngBq4skUNpKUDX7oEwo2X+ie1r1aMXDnNZhVqO5rZuJLt YCymzT3IRGASwptDouXFw67GqS88Y5GymTVi72TxNFnVu17/jGQnXUYHqx+sxcr2 4ziYMzMYcD1Mk4Q4qSHtWRmOzdluIDw+Sh3Qm8OGcuQNTXEc1cdDneGJzB+shMMn TV23Yd5lf2QbjwQ1hE/BJFClsrGdTpl8j/VXvWUsMTHqKP3HugEbfB/SMipiCxqC dDZD8xu7S+D7Q1wy2oBxb1fGW25Oi4d4DaunhOmK14NO7jOFvb9utk+CbCS2cYmj wXwZnkG87tlsEGd6MkLDVTQyJUUc0jEDE0F94OInfdqwr9MopN6bQbilwyZ8LPKn m7Hm1RAKt+/EQBWwK2tqco/v/lcGOREEpESL+xT1pLurPnyoGRo0wuKFK1Qpk2WR PI7TTN5dZfEhSH4JgmLJLrn/S2BZMxLURGVcrcQWzBe/ORHE65aenTPS6sHTa3nM xM8vN4rUNL39bmZuQxcJUOrFpX3PfriKj8pzKP7aHh1W8KHdtppPBTOKlReVCG0n LA1LKUBvcx4+sX2GJh+iAIFQFCq6DJ5bLNeXsqUSWMFN//E+FZ0cJzKxqAfMDxwl IDs/GAmTczQpyTIyrVAFDTAEjDVujXHTh4UrgLizH6wvl7Cnv/Tca1R43iRao2iD FrQSVtTlMKJeKR8dSXOBViGGWgjmv1YbXJ9mc32kP7rko7h3TlSSzQAITN7H9xEQ j0oWqO2IgVGbHs6lvzoZSkEuibbKJu7IwQe/X2dEHOwzX7CU3nGDw6cSPfbSkqwn wxw= =gy8S -----END PGP SIGNATURE----- ``` vasild's public key is [on openpgp.org](https://keys.openpgp.org/vks/v1/by-fingerprint/850E138BA9C0923881DFD55FCE712013582E2230) </details>
pablomartin4btc (Migrated from github.com) reviewed 2026-11-24 20:19:28 +00:00
pablomartin4btc (Migrated from github.com) left a comment

re-ACK e7120dc700

Clean rebase: range-diff vs 0e3c1a2de0 only touches the ProcessSendTxRcncl() extraction, picking up the reordering from #36752 (disconnect after VERACK before the m_txreconciliation check), still move-only.

https://github.com/bitcoin/bitcoin/pull/36521 is closed and not for backport?

Adding to @vasild's point: #36521 was closed and split up. The part marked for backport now, #36895 (33.0 milestone), doesn't touch net_processing.cpp and no longer conflicts with this PR. The other split-off, #36906, only has a trivial one-line conflict (TX_WITH_WITNESS -> TX_WITH_WITNESS_P2P in the tx handler) and isn't marked for backport.

@vasild, if you have some time, I'd really appreciate your review on #35522 (the same kind of extraction/ refactoring for SendMessages()), which I put in draft for the same reason @maflcko raised here. It doesn't conflict with #36895 or #36906 either, so I'll undraft it once I rebase it.

re-ACK e7120dc7002fd91c061df45e58d527fb03dd16e3 Clean rebase: range-diff vs 0e3c1a2de03596cfaf5de25cc052b96ef88728af only touches the `ProcessSendTxRcncl()` extraction, picking up the reordering from #36752 (disconnect after `VERACK` before the `m_txreconciliation` check), still move-only. > https://github.com/bitcoin/bitcoin/pull/36521 is closed and not for backport? Adding to @vasild's point: #36521 was closed and split up. The part marked for backport now, #36895 (33.0 milestone), doesn't touch `net_processing.cpp` and no longer conflicts with this PR. The other split-off, #36906, only has a trivial one-line conflict (`TX_WITH_WITNESS` -> `TX_WITH_WITNESS_P2P` in the `tx` handler) and isn't marked for backport. @vasild, if you have some time, I'd really appreciate your review on #35522 (the same kind of extraction/ refactoring for `SendMessages()`), which I put in draft for the same reason @maflcko raised here. It doesn't conflict with #36895 or #36906 either, so I'll undraft it once I rebase it.
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!35502
No description provided.