BC
← All projectsBitcoin Core

Bitcoin Core

The Bitcoin network's reference node and wallet implementation.

BitcoinSupply chainNormal
Repository coverage

3483 commits in the local evidence base

Every captured commit receives deterministic security triage and a separate communication-quality score. Security candidates and broader second-pass signals receive full-patch Ollama analysis.

402security candidates730second-pass queue3152AI analyses
172commits · 30 days
325commits · 60 days
1193commits · 180 days
2758commits · 365 days
Backfill bands
Aug 5 → Feb 61351 seen45 candidatesComplete
Feb 6 → Jun 61033 seen63 candidatesComplete
Jun 6 → Jul 6281 seen11 candidatesComplete
Jul 6 → Aug 5207 seen5 candidatesComplete
Commit communication

Does the history explain itself?

Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.

73/100 average clarity
1453Strong · 80–100
1227Adequate · 60–79
715Thin · 40–59
88Opaque · 0–39
6security candidates with opaque commit messaging
Read the scoring rubric →
Developer activity

Who is changing the project?

Public Git author strings; identities are not independently verified.

DeveloperCommitsCandidatesAnalyzedHigh riskMessage avg.
merge-script419112196589
Antoine Poinsot25422169
Ava Chow21874203071
MarcoFalke41923411074
fanquake24521230058
Lőrinc18121177081
Hennadii Stepanov25120221066
rkrux57957074
Sjors Provoost89889074
Sebastian Falbesoner33733073
David Gumberg55655072
Pieter Wuille95595066
Analysis record

Published AI watches

Last scanned 1 minute ago

Informational 15 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36704: doc: fix docs and enable `-Wdocumentation-pedantic`

This commit only changes documentation comments and enables a stricter compiler warning for documentation style. It does not alter any executable code, so it cannot introduce or fix a security vulnerability on its own.

0afaa731by Hennadii Stepanov+79−7716 files
No security note in commit
Low 41 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36040: Wallet: Don't backdate locktime rbf

This change fixes a privacy leak in Bitcoin Core's wallet. When users used the 'bumpfee' feature to replace a transaction with a higher fee, the replacement could sometimes end up with an older 'locktime' than the original transaction. Thi…

Privacy/fingerprinting issue in wallet transaction creationReplacement transaction locktime can be lower than original transaction locktimeAnti-fee-sniping random backdating can produce identifiable on-chain pattern
004cfb21by Ava Chow+171−86 files
Vendor flagged security relevance
Moderate 62 AI analysisMessage 86 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36342: wallet: reject recipient amounts above MAX_MONEY

This patch fixes a bug in Bitcoin Core's wallet transaction creation where extremely large output amounts could cause an integer overflow or even crash the node. Before the fix, a user could craft a transaction whose outputs added up to mo…

Integer overflow in recipient amount summationNode abort via failed assertion in coin selectionPossible creation of a transaction with wrapped/invalid total output value
8c360f08by Ava Chow+25−42 files
Vendor flagged security relevance
Low 49 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36637: torcontrol: send -torpassword hex-encoded to avoid escaping bugs

This change fixes how Bitcoin Core sends your Tor control password to the Tor daemon. Previously, the password was wrapped in quotes and only double-quote characters were escaped. If a password contained a backslash, Tor would misinterpret…

Improper escaping of protocol string (QuotedString)Potential Tor control command boundary confusionAuthentication bypass/failure risk for Tor control
6090f0afby Ava Chow+42−62 files
Vendor flagged security relevance
Low 30 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36387: wallet: rpc: Deprecate `encryptwallet` RPC for encrypting existing wallets.

This commit marks the existing 'recortar el video' feature as deprecated. It doesn't remove it, but it now shows a warning and requires a special flag to use. The change is meant to protect users from accidentally losing access to their bi…

Deprecation of risky wallet-encryption workflowKnown data-retention risk: unencrypted key material may remain on disk after late encryptionKnown backup/restore risk: post-encryption keys are not covered by pre-encryption backups
f98888efby Ava Chow+165−8819 files
Vendor flagged security relevance
Informational 21 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36087: util: Add and use AssertUnreachable

This is a code-cleanup change in Bitcoin Core. It replaces many uses of `assert(false)` and similar 'this should never happen' markers with a new macro called `AssertUnreachable()`. The goal is to make the code clearer for developers and a…

No security-relevant functional change: process still aborts on unreachable pathsRefactor only: replaces one abort mechanism with another equivalent oneAdds a new lint rule to enforce the preferred macro going forward
3ee664eaby Ryan Ofsky+274−26484 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36888: test: construct `coinselection_tests` output declaratively

This is a minor cleanup inside a single test file. It changes how a fake transaction output is built in a unit test so the empty script is written explicitly rather than created implicitly by resizing a list. The actual test behavior and t…

a690300eby merge-script+4−31 file
No security note in commit
Low 35 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36890: Update secp256k1 subtree to latest master

This is a routine subtree update for the secp256k1 cryptographic library inside Bitcoin Core. It pulls in several upstream fixes, most of which are build-system cleanups, test improvements, and API hardening. The most user-visible changes …

Silent Payments API no longer aborts on empty input/output arrays; returns 0 per documented behaviorSilent Payments label-tweak overflow now rejected with ARG_CHECK instead of being silently handledecmult_const gains a _ge variant that clears intermediate Jacobian coordinates to reduce secret leakage
c3d1b4c0by merge-script+902−49134 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36867: test: remove legacy wallet leftovers from wallet functional tests

This commit only cleans up Bitcoin Core's own functional test suite. It removes unused multisig test code, fixes outdated docstrings, and drops a no-longer-needed command-line flag in test scripts. None of these changes affect the actual B…

c138ff92by merge-script+40−923 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36914: test: simplify wallet_basic and rpc_getblockfilter tests

This commit only cleans up two internal test scripts for the Bitcoin Core project. It replaces a manual network disconnect/reconnect pattern with a simpler way to create an unconnected block header, and removes a hard-coded number in favor…

079437ccby merge-script+6−112 files
No security note in commit
Informational 15 AI analysisMessage 82 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

test: Drop hard-coded magic 3

This is a tiny code cleanup in a Bitcoin Core test file. It replaces the hard-coded number 3 with the actual number of test nodes, making the test slightly easier to maintain. It does not change any real Bitcoin Core software behavior and …

1eeeee49by MarcoFalke+3−31 file
No security note in commit
Informational 20 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36864: rpc: deprecate iswatchonly field of getaddressinfo

This change hides an old, always-false field called 'iswatchonly' from the getaddressinfo API response unless the user explicitly asks for deprecated features. It is a routine cleanup, not a security fix, and does not change how wallets or…

66531447by merge-script+16−34 files
No security note in commit
Informational 15 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36868: test: remove unused nodes and restarts from wallet tests

This commit only cleans up Bitcoin Core's own automated test suite. It removes unused test nodes and an unnecessary double restart in a few wallet-related test scripts. There is no change to the actual Bitcoin node software that users run,…

0fb50460by merge-script+24−324 files
No security note in commit
Moderate 68 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36894: net_processing: set fDisconnect instead of calling DisconnectNode

This change fixes a bug where Bitcoin Core would disconnect every peer sharing the same IP address when one peer misbehaved. The problem is especially bad for users connecting through Tor, because all Tor traffic exits through a small set …

Denial of service via shared IP disconnectTor exit-node IP collision exploited to disconnect honest peersPeer-to-peer network isolation of inbound connections
6832a273by merge-script+5−53 files
Vendor flagged security relevance
Moderate 62 AI analysisMessage 73 · Adequate
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

net_processing: set fDisconnect instead of calling DisconnectNode

This commit fixes a bug where Bitcoin Core would disconnect every peer sharing the same IP address when one of them misbehaved. Because Tor exit nodes share a single IP address among many users, a malicious user could deliberately misbehav…

Denial-of-service via shared IP disconnectTor exit-node IP collision exploited to disconnect honest peersPeer-disconnection logic changed from subnet match to single-node flag
d63068c5by Eugene Siegel+5−53 files
Vendor flagged security relevance
Informational 15 AI analysisMessage 81 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36875: scripted-diff: Drop `IWYU pragma: keep` from build config includes

This change is purely a code-cleanup and linting improvement. It removes repetitive 'IWYU pragma: keep' comments from build-config header includes and instead marks the generated config header itself with a single 'always_keep' pragma. The…

1fbb5253by merge-script+67−7265 files
No security note in commit
Informational 19 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36451: refactor: Use NotNull for CreateNewBlock and pimpls

This is a code cleanup change that makes the type system express 'this pointer can never be null' for several internal objects and for block templates. It removes redundant null checks and adds helper functions to create such non-null poin…

No security-relevant bug is patchedChange is purely a type-system refactorRemoves dead null-check error paths rather than adding safety checks
8130b3b8by Ryan Ofsky+78−5230 files
No security note in commit
Informational 15 AI analysisMessage 100 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36848: test: drop flaky "server too slow" check from interface_http.py

This commit only changes a test file to make a timing check less strict. It removes an upper-bound timing assertion that was causing false test failures on slow CI machines. There is no change to Bitcoin Core's actual network or wallet cod…

e1a27bbbby merge-script+6−61 file
No security note in commit
Informational 20 AI analysisMessage 91 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36488: rpc: wallet: Schedule mixed-case confTarget option deprecation

This commit is a routine cleanup, not a security fix. It removes support for an old, confusingly-named option ('confTarget') in two Bitcoin wallet commands (bumpfee and psbtbumpfee), leaving only the clearer 'conf_target' name unless the u…

8b0b5775by merge-script+24−34 files
No security note in commit
Informational 15 AI analysisMessage 96 · Strong
BC Bitcoin CoreBitcoin Core BitcoinSupply chain

Merge bitcoin/bitcoin#36408: test: allow 3 bytes of fee overestimate in assert_fee_amount

This is a tiny change to a Bitcoin Core test helper that makes fee-checking tests slightly more tolerant. It is not a security fix and does not affect production wallet code or consensus rules. It simply reduces how often an extremely rare…

dd9d016bby merge-script+3−21 file
No security note in commit
Repository ledger

Explore captured commits

Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.

Security candidateMerge bitcoin/bitcoin#29843: policy: Allow non-standard scripts with -acceptnonstdtxn=1 (test nets only)by merge-script · 05187ec2 · Oct 29, 2026 · 8 filesMessage 100 · StrongInformational 22Details
Commit message · merge-script

Merge bitcoin/bitcoin#29843: policy: Allow non-standard scripts with -acceptnonstdtxn=1 (test nets only)

1176a20d5263d6ae7ff80398928a2a5b1a0ebd6a doc: add release note for -acceptnonstdtxn changes (Anthony Towns)
1df5910720495eb2e8e453fb40da222dd794424a validation: Add compile-time checks for consensus flags (Anthony Towns)
425115713c5e37e78c9051b1b0a997ad62067ec8 validation: Check only (potential) block script flags when -acceptnonstdtxn is set (Anthony Towns)
703ebdf9de87ffb6010d89e3f0bd49e3c6cdb030 validation: Be explicit about whether CheckInputScripts is for block/mempool (Anthony Towns)
81ef18236fc74913344bd9e28b1e27a50a4e3ae7 tests: test tx rejection for both -acceptnonstdtxn=0 and 1 (Anthony Towns)
9b6342e5d295e337791984af2d42681d9c8e08bb tests: in p2p_segwit, check non-mandatory errors with -acceptnonstdtxn=0 node (Anthony Towns)

Pull request description:

This PR changes `-acceptnonstdtxn=1` so that it also skips the non-mandatory script checks, allowing txs that (eg) use OP_NOPx or OP_SUCCESS into the mempool. This remains only available on test nets.

ACKs for top commit:
fjahr:
reACK 1176a20d5263d6ae7ff80398928a2a5b1a0ebd6a
instagibbs:
reACK 1176a20d5263d6ae7ff80398928a2a5b1a0ebd6a

Tree-SHA512: 6157072c98369d06642bd7383bfabe82a4054a1f204b7a669a90b01429a2104e8815bd20785b11910f1b4d578db11e8a5a71f7f043d1aad083ec120233c9690c

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
consensus or confidential-proof validationmerge-commit duplicate discount
AI analysis · Informational 22/100

This change loosens transaction acceptance rules only on Bitcoin test networks when a special command-line option (-acceptnonstdtxn=1) is used. It lets developers test unusual or experimental scripts in the mempool, while still enforcing all consensus rules that protect real money. Main network behavior is unchanged, and the option is not available there.

AI review queuedMerge bitcoin/bitcoin#36682: refactor: Use std::erase and std::erase_ifby merge-script · 363d9e9d · Oct 29, 2026 · 13 filesMessage 93 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36682: refactor: Use std::erase and std::erase_if

fa87bfe31dfda2d102c4e0cb5d39813cf84c7d1e refactor: Use std::erase and std::erase_if over iterator-based erase (MarcoFalke)
fa93a02563145aca3f96badaabe302b2dfa331d5 refactor: Use std::erase and std::erase_if over list removal or vector erase-remove (MarcoFalke)

Pull request description:

Convert `remove` and `remove_if` to the C++20 `std::erase` and `std::erase_if` overloads.

The legacy ones can be confusing, because:

* Array-based containers (like vector) must use the erase-remove idiom. Forgetting the erase, or forgetting to pass the end iterator (`bugprone-inaccurate-erase`) can be a bug, see also https://github.com/bitcoin/bitcoin/pull/36588#discussion_r4345799022. So a call only to "remove" will not erase.
* Node-based containers (like list or set) must not use the idiom. Using it will be a pessimization or won't compile. And correctly not using the idiom reads confusing, because a call to "remove" will actually erase.
* They are more verbose.

Also convert simple iterator-erase (which is verbose, but fine) to the std overload.

ACKs for top commit:
jpk68:
ACK fa87bfe31dfda2d102c4e0cb5d39813cf84c7d1e
hodlinator:
ACK fa87bfe31dfda2d102c4e0cb5d39813cf84c7d1e
w0xlt:
ACK fa87bfe31dfda2d102c4e0cb5d39813cf84c7d1e

Tree-SHA512: 08fca3ecb73a5c45371a2e65339d9e35911f89dc717568cc29564f1a1395a44d84e939b9d38a21cadf5f2cbd64463c2564b1f7239ca75f53cf0bb30ae724dafd

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathparser or protocol pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a code cleanup that replaces older, more verbose ways of removing items from lists and vectors with newer C++20 standard helpers called std::erase and std::erase_if. It does not change what the program does, only how the source code expresses it. There is no security bug being fixed here.

Security candidateMerge bitcoin/bitcoin#36676: cli: respect -rpcclienttimeout even when sendingby merge-script · 0f27bed5 · Oct 28, 2026 · 1 fileMessage 91 · StrongLow 34Details
Commit message · merge-script

Merge bitcoin/bitcoin#36676: cli: respect -rpcclienttimeout even when sending

e5d9a7e04b50c723aeb65984e5048ffd098f6737 cli: fail to send a request when the socket does not become writable (Antoine Poinsot)

Pull request description:

The move away from libevent introduced a small regression in this regard. In #36299, we switched the timeout to apply per socket wait, but continued on to another socket wait in case of timeout, instead of returning. See commit message for details.

In general, we also shouldn't ignore `Sock::Wait`'s errors and timeouts by silently retrying forever.

Fix these issues by returning instead when `Sock::Wait` times out or returns an error. ~~Tentative bot functional test for this in second commit that appears to be robust enough.~~

ACKs for top commit:
jpk68:
ACK e5d9a7e04b50c723aeb65984e5048ffd098f6737
l0rinc:
tested ACK e5d9a7e04b50c723aeb65984e5048ffd098f6737
pinheadmz:
ACK e5d9a7e04b50c723aeb65984e5048ffd098f6737

Tree-SHA512: f662e911fbba2d2a97e9d9ba559e8cfd8fd163a08ba8ff812f969c9ea42f0d24d5e013a558a2b488c346f9d5611a2faba0e2ade780ba9b290124fb441ac771ff

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
access controlmerge-commit duplicate discount
AI analysis · Low 34/100

This patch fixes a bug in bitcoin-cli (the command-line tool used to talk to a Bitcoin node) where the -rpcclienttimeout setting was not being respected while sending a request. Previously, if the network socket was not ready to send data, the tool would wait, time out, then silently try again in an infinite loop. Now it correctly gives up and reports failure. This is primarily a reliability and user-expectation bug rather than a direct theft-of-funds vulnerability.

Security candidateMerge bitcoin/bitcoin#36678: doc: adapt release notes template to security disclosure policy updateby merge-script · f8c9f2b5 · Oct 28, 2026 · 1 fileMessage 86 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36678: doc: adapt release notes template to security disclosure policy update

ad68edfb92fba7603607a25d21de72c9f3b26fec doc: link to security disclosure policy in release notes template (Antoine Poinsot)
ae658dd8061b7b653cadaf5101fce1b9b2869ce3 doc: adapt release notes template to security disclosure policy update (Antoine Poinsot)

Pull request description:

Following the update to our security disclosure policy in https://github.com/bitcoin-core/bitcoincore.org/pull/1281, adapt the text related to vulnerability disclosures in the release notes empty template.

ACKs for top commit:
instagibbs:
reACK ad68edfb92fba7603607a25d21de72c9f3b26fec

Tree-SHA512: 75237d8c879a839568eda6100282fb76dbe43b94e9740b94850af70558dae9f451f7d60ca7aa5e8bebb42aa7f605376a563d4eb7440bf91a5a0446b8fadb7f63

86/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
explicit security languagedocumentation-only discountmerge-commit duplicate discount
AI analysis · Informational 15/100

This is a documentation-only change to the empty release notes template. It updates the wording that describes how Bitcoin Core discloses security vulnerabilities, linking to the project's security policy. No code, no bug fix, no vulnerability is present in this commit.

Security candidateMerge bitcoin/bitcoin#36529: test: measure rpcwaittimeout floor with monotonic timeby merge-script · aa76bd26 · Oct 27, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36529: test: measure rpcwaittimeout floor with monotonic time

dc27539d42bbfc04705d9ae1ea00cf70b046d8fa test: measure rpcwaittimeout floor with monotonic time (nervana21)

Pull request description:

Previously, `interface_bitcoin_cli.py` measured the `-rpcwaittimeout` wait floor with `time.time()`. `bitcoin-cli` arms that deadline with `std::chrono::steady_clock`, so a CI wall-clock step backward can make the elapsed time look short and cause the assert to fail.

Fix this by using `time.monotonic()` instead and using `-rpcwaittimeout=1`. The log line also now says "at least" so it matches the floor assert.

h/t ViniciusCestarii for suggesting `time.monotonic()` here.

ACKs for top commit:
maflcko:
lgtm ACK dc27539d42bbfc04705d9ae1ea00cf70b046d8fa
ViniciusCestarii:
ACK dc27539d42bbfc04705d9ae1ea00cf70b046d8fa

Tree-SHA512: 1213f786d21ce2fa0eb8f08a7c3c381a65dbfec3c4b534516b545e90ca661b0cda84de1482fb41cfe0e53b2a4dabc587f42701e8686b27455591859290c3a855

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
access controlmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit fixes a flaky automated test in Bitcoin Core. The test checks that bitcoin-cli waits at least the requested timeout before giving up when it cannot connect to the server. Previously the test used wall-clock time (time.time()), which can jump backwards if the computer's clock is adjusted, causing the test to fail even though nothing was wrong. The fix switches to monotonic time (time.monotonic()), which only moves forward, and shortens the timeout from 5 seconds to 1 second. There is no change to the actual Bitcoin Core software that users run, only to the test suite.

AI review queuedMerge bitcoin/bitcoin#36588: refactor: Enable more tidy bugprone checksby merge-script · 23288073 · Oct 27, 2026 · 5 filesMessage 100 · StrongInformational 18Details
Commit message · merge-script

Merge bitcoin/bitcoin#36588: refactor: Enable more tidy bugprone checks

facb2209061ce40f558d9e1feaaf8e9a627117e5 refactor: Enable bugprone-return-const-ref-from-parameter to find missing LIFETIMEBOUND annotations (MarcoFalke)
fa211896e55bba672646c9f7bcf7b18c408b8ced refactor: Enable some useful bugprone checks, which are clean right now (MarcoFalke)
faa76b44c6e4efa08179919e0c0cf68d32fe0b0e refactor: Enable bugprone-inaccurate-erase (MarcoFalke)
fafce023b3d006d1cc36369eb71e434a9147b56e refactor: Enable bugprone-string-literal-with-embedded-nul (MarcoFalke)
fab3062590eab577e0b3ab8b93d642c7026c0775 refactor: Enable bugprone-unused-raii (MarcoFalke)

Pull request description:

Enable some bugprone clang-tidy checks, which seem useful.

Apart from a test-only bug, they didn't find anything severe, but I think it still makes sense to enable them, so that it is easier to read the resulting code. Also, it is trivial to disable them, if they turn out annoying.

ACKs for top commit:
stickies-v:
re-ACK facb2209061ce40f558d9e1feaaf8e9a627117e5
hebasto:
ACK facb2209061ce40f558d9e1feaaf8e9a627117e5.

Tree-SHA512: 660e06ad581c662eeb23d35c729ca6f9dc5cae31f30b212cf543f1e4d59147f4ccf467fbeb4dbfbbbe47ed2acb4abac543a558a98dcf1ef1d4445847100846b2

100/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 18/100

This commit turns on additional automated code-quality checks in Bitcoin Core's clang-tidy configuration and makes a handful of small, matching cleanups. It is a refactoring/tooling change, not a fix for an active security bug. The only runtime code changes are switching one Qt container erase call to a safer modern form and adding a lifetime annotation to a D-Bus operator. The rest are test-only adjustments to satisfy new static-analysis rules.

Security candidateMerge bitcoin-core/gui#955: qt: filter addhdkey from RPC console historyby Hennadii Stepanov · 631b0065 · Oct 27, 2026 · 2 filesMessage 96 · StrongModerate 51Details
Commit message · Hennadii Stepanov

Merge bitcoin-core/gui#955: qt: filter addhdkey from RPC console history

31467d59a5a8e6721af1dc5d6592fad31339bcb9 qt: filter addhdkey from RPC console history (Mateusz Klatt)

Pull request description:

Filters `addhdkey` arguments from RPC console history, consistent with other RPCs that handle private key material.

This prevents extended private keys from being retained in history. It also covers the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

Adds a parser test verifying that the arguments are redacted.

## Motivation

`addhdkey` accepts a BIP 32 extended private key, but its arguments are currently retained in RPC console history, unlike other RPCs that handle private key material.

The same filter would also protect the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.

## Changes

- Add `addhdkey` to the RPC console sensitive-command filter.
- Add a parser test verifying that its arguments are redacted as `addhdkey(…)`.

## Tests

- `./build_gui/bin/test_bitcoin-qt` — all tests passed, including `RPCNestedTests::rpcNestedTests()`.

ACKs for top commit:
jpk68:
ACK 31467d59a5a8e6721af1dc5d6592fad31339bcb9
hebasto:
ACK 31467d59a5a8e6721af1dc5d6592fad31339bcb9, I have reviewed the code and it looks OK.

Tree-SHA512: e837f2ab0c3073266922fee8a72ab450830a4aa6193996ab7e72222738c8755bc3f073d155fddb827a5271821c3ac11e51053da422e6f09cac91b438d97b5f5e

96/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
secret or key materialaccess controlmerge-commit duplicate discount
AI analysis · Moderate 51/100

This update stops the Bitcoin Core graphical wallet from remembering the command-line arguments of a sensitive command called addhdkey. Previously, if a user typed addhdkey followed by their extended private key or recovery phrase into the built-in RPC console, that secret material would be saved in the console's command history. Other secret-handling commands were already filtered, but addhdkey was missed. The fix adds it to the same filter and includes a test that confirms the arguments are replaced with a redacted placeholder.

Security candidateMerge bitcoin/bitcoin#36674: Update leveldb subtree to latest masterby Hennadii Stepanov · 15ba4229 · Oct 27, 2026 · 1 fileMessage 81 · StrongInformational 23Details
Commit message · Hennadii Stepanov

Merge bitcoin/bitcoin#36674: Update leveldb subtree to latest master

e1dfb04fcf21649097b4c2d5cc651f83b9531fd3 Squashed 'src/leveldb/' changes from 53a1914e00..24a446f834 (fanquake)

Pull request description:

Includes:
* https://github.com/bitcoin-core/leveldb-subtree/pull/66

Used in #36623.

ACKs for top commit:
hodlinator:
ACK 8d3d929e4d77532faf25dd0ae3bcfa666e581e89
hebasto:
ACK 8d3d929e4d77532faf25dd0ae3bcfa666e581e89

Tree-SHA512: 829791aaf651787f2b7109ff51704971e30832738337a71705d6ff81c2d99037e2ba1670b3dad25077e3d14e10609a36206521fd773839189cef3f92a0e166ae

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
access controlmerge-commit duplicate discount
AI analysis · Informational 23/100

This commit removes an unreachable 'return false;' statement from a LevelDB log-reading function. In some build configurations, compilers warn about code that can never execute; removing it silences those warnings and makes the function's actual control flow clearer. The change itself does not alter program behavior in normal operation.

Security candidateMerge bitcoin/bitcoin#36624: test: Enable noban_tx_relay in a few more testsby merge-script · a773e1e3 · Oct 23, 2026 · 43 filesMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36624: test: Enable noban_tx_relay in a few more tests

fa704c5d3cafcd768982a02c48c7c7d96d667fa1 test: Use faster noban_tx_relay in mempool tests (MarcoFalke)
fa6f7e36a8c27d8d4824c4dbec45abd405388abe test: [doc] Clarify noban_tx_relay comment (MarcoFalke)
faf2e3aba59b8023d84f09a68cc946f1ed3f526a test: Use proper noban permission for faster tx relay (MarcoFalke)

Pull request description:

For https://github.com/bitcoin/bitcoin/issues/19732 (see commit msgs for details)

ACKs for top commit:
ViniciusCestarii:
ACK fa704c5d3cafcd768982a02c48c7c7d96d667fa1
brunoerg:
ACK fa704c5d3cafcd768982a02c48c7c7d96d667fa1

Tree-SHA512: fa6906b4ef0a921fc321db6784173c2c0461e90b19d3a058cd5ac93e6ac953bfc75131740c534b18c133dd815a2d80f8846f3feed721457c30995bcfc0157472

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
credential or privilege statesigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit only changes Bitcoin Core's internal functional test suite. It replaces manual '-whitelist=noban@127.0.0.1' settings and verbose comments with a shared test flag called 'noban_tx_relay' to make automated tests run faster. There is no change to the actual Bitcoin node software that users run, and no security vulnerability is introduced or fixed.

Security candidatetest: [doc] Clarify noban_tx_relay commentby MarcoFalke · fa6f7e36 · Oct 23, 2026 · 39 filesMessage 90 · StrongInformational 15Details
Commit message · MarcoFalke

test: [doc] Clarify noban_tx_relay comment

The comment is verbose and there are many whitelist permissions like
`relay` or `mempool`, but this applies `noban` to in- and out-
connections.

A brief `self.noban_tx_relay = True # faster tx relay` covers the same
meaning with less confusion.

90/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
credential or privilege statesigning or wallet path
AI analysis · Informational 15/100

This commit only rewrites comments in Bitcoin Core's test suite. It replaces longer explanations about whitelisting peers with a shorter note that the setting is used for faster transaction relay. No actual code behavior changes, so it has no security impact.

Security candidatetest: Use proper noban permission for faster tx relayby MarcoFalke · faf2e3ab · Oct 23, 2026 · 1 fileMessage 87 · StrongInformational 15Details
Commit message · MarcoFalke

test: Use proper noban permission for faster tx relay

A plain -whitelist=noban@127.0.0.1 misses the out connections.

87/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides an explanatory body✓ Mentions testing or verification
Why it was queued
credential or privilege statesigning or wallet path
AI analysis · Informational 15/100

This is a minor test-only change in Bitcoin Core's functional test suite. It replaces a manual whitelist flag with a built-in test framework option that achieves the same goal for both incoming and outgoing peer connections. There is no change to production code, no security fix, and no vulnerability.

AI review queuedtest: construct transaction_tests test_Get inputs/outputs declarativelyby Alexander Wiederin · bdf58dd8 · Oct 23, 2026 · 1 fileMessage 95 · StrongInformational 15Details
Commit message · Alexander Wiederin

test: construct transaction_tests test_Get inputs/outputs declaratively

Replace the field-by-field construction of the inputs and outputs with
COutPoint, CTxIn and CTxOut constructor calls.

The second output was previously only created by vout.resize(2) and
never assigned, leaving it null (nValue = -1). It is kept as a
default-constructed CTxOut so the transaction is unchanged.

95/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context✓ Mentions testing or verification
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a minor cleanup of a unit test file in Bitcoin Core. It replaces verbose, field-by-field construction of test transaction inputs and outputs with shorter declarative constructor calls. The behavior of the test is intentionally unchanged: the second transaction output remains default-constructed, just as it was before when it was created by resize(2) but never assigned. There is no change to production code, network behavior, or wallet handling.

AI review queuedMerge bitcoin/bitcoin#35395: doc: Improve test suite dependencies documentationby merge-script · 152a5539 · Oct 22, 2026 · 7 filesMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#35395: doc: Improve test suite dependencies documentation

22230f49f02b99be7077d6c52a775c322049903c doc: Unify Python optional module and test dependency documentation (Hennadii Stepanov)
39502b49b27ace1ffd27e9c5a28c8a97673b69c7 doc: Improve Python UTF-8 mode note (Hennadii Stepanov)
b51979ea7f6f39c0e22ef722557da7a35657f26f doc: Fix header formatting in `test/README.md` (Hennadii Stepanov)

Pull request description:

The current documentation has multiple issues:
1. OS-specific notes are missing for the `pycapnp` module.
2. `python3-zmq` is a package name in some Linux distros, rather than a Unix-wide convention.
3. Installing `pyzmq` from PyPI works in general, not only on macOS.

This PR resolves these issues. Additionally, two minor improvements have been added (see commit messages).

ACKs for top commit:
maflcko:
review ACK 22230f49f02b99be7077d6c52a775c322049903c 🎙
sedited:
ACK 22230f49f02b99be7077d6c52a775c322049903c

Tree-SHA512: 5c4eb3bde40594cddaa1ca4983f9c04de87d11c4ea7d3978eeeceec279cd45a2b689b4b2f163eb3592f14f22db128592fee84e126026e30ecff7299820227650

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
documentation-only discountmerge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Informational 15/100

This commit only updates documentation. It reorganizes instructions for installing Python test-suite dependencies across operating systems and consolidates them into a single README file. No program code was changed, so it cannot directly affect security or introduce vulnerabilities.

Security candidateMerge bitcoin/bitcoin#36581: subprocess: fix command line memory leak on Windowsby merge-script · 2cd1db40 · Oct 22, 2026 · 1 fileMessage 93 · StrongInformational 24Details
Commit message · merge-script

Merge bitcoin/bitcoin#36581: subprocess: fix command line memory leak on Windows

cf30d0a4123bb4237495f04e723ce9f706c2edf2 subprocess: fix command line memory leak on Windows (stickies-v)

Pull request description:

`Popen::execute_process()` copied the command line into a buffer from `new[]`, but did not delete it. This leaked memory each time a process started on Windows.

`CreateProcessA` [needs](https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa#:~:text=characters%2E-,The,violation) a writable command line buffer. Since C++17, `std::string::data()` supplies one, so give the `std::string` buffer directly and remove the copy.

This only affects Windows. It is only reachable if `-signer=<cmd>` is set, through authenticated RPC or the GUI. Each call leaks only the startup-defined `<cmd>`, and the rate is limited by process spawn time, so the impact is limited.

_edit: this was fixed upstream in https://github.com/arun11299/cpp-subprocess/pull/131, but since this codebase is C++20 it seems better to avoid the copy (and the const cast). A direct backport isn't possible anyway, since #35704 switched us to CreateProcessA._

ACKs for top commit:
jpk68:
ACK cf30d0a4123bb4237495f04e723ce9f706c2edf2
hebasto:
re-ACK cf30d0a4123bb4237495f04e723ce9f706c2edf2.
winterrdog:
reACK cf30d0a4123bb4237495f04e723ce9f706c2edf2

Tree-SHA512: 873a5b69e4094dfc1cba0f822af1e431f7d6e29f2fac58e0712ffa060296022db0cbff55ab6f7a4416168e4958bcaa1567ad568f2a3a662e3cb4603bbb786816

93/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
Why it was queued
access controlmerge-commit duplicate discount
AI analysis · Informational 24/100

This commit fixes a small memory leak in Bitcoin Core on Windows. When starting an external signer program, the code previously copied the command string into a freshly allocated buffer but never freed it. The fix passes the string's own buffer directly to Windows, eliminating both the copy and the leak. The leak only occurs when an optional external signer is configured, and each leak is tiny (just the command string), so the practical security impact is very low.

AI review queuedMerge bitcoin/bitcoin#36456: Test: Cover malformed and truncated tx encodingsby merge-script · 2034d307 · Oct 22, 2026 · 2 filesMessage 91 · StrongInformational 12Details
Commit message · merge-script

Merge bitcoin/bitcoin#36456: Test: Cover malformed and truncated tx encodings

10f7cf848792b040bb3d1393598250c71c5700e0 Test: Cover malformed and truncated tx encodings (benthecarman)

Pull request description:

Check that every strict prefix of a witness transaction fails to deserialize, and that a witness flag of 0x02, which skips the witness section, is rejected as unknown optional data. Also check that CompactSize prefixes missing some of the bytes they announce fail to read.

These were discovered by finding gaps in an alternate implementation (bitcoin-s)

ACKs for top commit:
darosior:
ACK 10f7cf848792b040bb3d1393598250c71c5700e0

Tree-SHA512: 997ccb4b04269d991035bb71ca2e3cbe7cfad1481b399d5456e99521eb10f064762533fbc9afa98a7aaecf6364b25f09931b58de7a413f07638a63f29d722c85

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Informational 12/100

This commit only adds new test cases to Bitcoin Core. It does not change any production code, so it cannot directly introduce or fix a security vulnerability in running software. The tests verify that malformed and truncated transaction data is rejected properly, which helps ensure existing protections keep working.

Security candidateMerge bitcoin/bitcoin#36457: Test: Cover malformed merkle trees and nBitsby merge-script · 316ea328 · Oct 21, 2026 · 2 filesMessage 91 · StrongInformational 14Details
Commit message · merge-script

Merge bitcoin/bitcoin#36457: Test: Cover malformed merkle trees and nBits

0c0e6ba0167e9397e521ba3cbc7a4779ad7518b7 Test: Cover malformed merkle trees and nBits (benthecarman)

Pull request description:

Add tests for malformed partial merkle trees, including the transaction count limit at its 16666 boundary, and for `GetBitsProof` returning zero for zero, negative and overflowing targets.

These were discovered by finding gaps in an alternate implementation (bitcoin-s)

ACKs for top commit:
instagibbs:
reACK https://github.com/bitcoin/bitcoin/pull/36457/commits/0c0e6ba0167e9397e521ba3cbc7a4779ad7518b7

Tree-SHA512: 5d44cef07d121e92e298c23fbda283a48ed92b460c557cf789fa5e6f7c67534f6f99109a6b31c8fdecc5db6851fee5a85c78af5ad9a487b788b37821ebb335a4

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
memory safetymerge-commit duplicate discount
AI analysis · Informational 14/100

This commit only adds new test cases to Bitcoin Core. It does not change any production code, so it cannot introduce a runtime vulnerability or directly fix one. The tests exercise how the software rejects malformed partial Merkle trees and how it handles unusual proof-of-work target values. The pull request description says the test ideas came from comparing against another implementation (bitcoin-s), but the commit itself is purely additional test coverage.

AI review queuedMerge bitcoin/bitcoin#35919: p2p: cap maxconnections at 2,000 to reduce crash riskby merge-script · f86c614e · Oct 21, 2026 · 5 filesMessage 81 · StrongLow 39Details
Commit message · merge-script

Merge bitcoin/bitcoin#35919: p2p: cap maxconnections at 2,000 to reduce crash risk

b30f750de56c4e510f8af5a4dbba4e821b71a9b1 p2p: cap maxconnections at 2000 (Lőrinc)

Pull request description:

**Problem:** The orphanage can abort when more than 3,000 peers have orphan announcements.
The `-maxconnections` setting currently has no explicit upper bound.

**Fix:** Cap `-maxconnections` at 2,000 with a warning before reserving file descriptors, while retaining the default of 200.

ACKs for top commit:
instagibbs:
reACK https://github.com/bitcoin/bitcoin/pull/35919/commits/b30f750de56c4e510f8af5a4dbba4e821b71a9b1
optout21:
reACK b30f750de56c4e510f8af5a4dbba4e821b71a9b1
sedited:
ACK b30f750de56c4e510f8af5a4dbba4e821b71a9b1

Tree-SHA512: 06b892a67d9031f60427d04862fb0b96b30015c93904e544b4ec083c5713e56ab8b58c8747cb14b6bbd7ee52ca6a0d1ab5c4d9607789a19987bbda89a0689afd

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Low 39/100

This update limits how many peer connections Bitcoin Core will allow a user to request. Previously, a user could set an extremely high number of connections, which could trigger a crash when the orphan transaction cache (used for unconfirmed transactions) was shared across too many peers. Now, values above 2,000 are automatically reduced to 2,000 with a warning. It is a hardening fix, not a remote exploit.

AI review queuedMerge bitcoin/bitcoin#36579: refactor: Enable some string performance tidy rulesby merge-script · a2d42ce8 · Oct 21, 2026 · 21 filesMessage 81 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36579: refactor: Enable some string performance tidy rules

fabb6bbe53e9cba85b62da2416287c41975d71dd refactor: Use single-char overload in execute_process WIN32 block (MarcoFalke)
bbbb9c6d73a3750185c62bcb520b6ba74ac34be9 refactor: Enable performance-faster-string-find (MarcoFalke)
faae016796ed64da493cb175e40fca042fe386e6 refactor: Enable performance-prefer-single-char-overloads (MarcoFalke)
fa7973e1138aea8f1584205f4a5391a06447e2b9 refactor: Enable performance-string-view-conversions (MarcoFalke)

Pull request description:

Enabling the string performance clang-tidy rules should be fine and easy.

E.g. on aarch64, when running the `BlockToJsonVerboseWrite` bench, I can see a minimal 0.3% drop in instructions and 0.6% drop in branches.

ACKs for top commit:
stickies-v:
re-ACK fabb6bbe53e9cba85b62da2416287c41975d71dd
hebasto:
ACK fabb6bbe53e9cba85b62da2416287c41975d71dd.
l0rinc:
ACK fabb6bbe53e9cba85b62da2416287c41975d71dd

Tree-SHA512: 5917732c61960021d423fe8da5ada6eab986ab87e15f328ac74f5e31d0a1f1ea9d448b2dadad70418471b833da994bc3708c73e6e210fd5f2b2d08e88ce01bff

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: unusually broad changesecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit is a routine code cleanup that turns on three clang-tidy style checks and applies the resulting mechanical fixes. It replaces multi-character string literals like " " and "\n" with single characters where a single character is enough, and removes a few unnecessary std::string conversions. The changes are purely about code style and tiny performance gains (the author reports roughly 0.3% fewer CPU instructions in one benchmark). There is no security bug being fixed and no new attack surface introduced.

Security candidateMerge bitcoin/bitcoin#36509: refactor: remove more dead codeby merge-script · d3c3871b · Oct 21, 2026 · 35 filesMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36509: refactor: remove more dead code

570c4a184f49b6d71bc581ae694b969a91cf2510 build: enable -Wunused-macros & -Wunused-template (fanquake)
7981e61764474d914ad7808cac939b821c854495 test: remove unused equal from check_equal() (fanquake)
e8a70c0c68874b153cf02f0b49269ad40302f850 qt: remove unused WalletController::m_options_model (fanquake)
2e23a5b1f1602fb9ff5f6cf659cf1d30c5576dab qt: remove unused AddressBookPage::sendCoins signal (fanquake)
18a5e90179dd0b70b73bef82c0a7aca8c7770f23 qt: remove unused ClientModel::getNumBlocks and its cache (fanquake)
3a3e0ced8c1618f21b662b79902c05df4dc3297a qt: remove unused BitcoinAmountField::setReadOnly (fanquake)
f226197c0015108b3d0f3fd6a3d068275aacefd5 qt: remove unused BitcoinAmountField::SetMaxValue (fanquake)
92ad4ad4042f6ed8b20abe408e713d5e6eea7230 qt: remove unused removeAllWallets (fanquake)
4881802c3f6088f284923003d57ecc7c8a409c41 qt: remove stale PeerTablePriv forward declaration (fanquake)
3f40af467271177abad96426092c03cbb2e231d2 fuzz: remove unused FuzzedWallet::GetScriptPubKey (fanquake)
fc21d18741130aacca21289304da9b6a22eca768 qt: remove unused COLOR_BLACK (fanquake)
830a95548a444a3f1fe86bc26881b290382a5a23 refactor: remove unused ScriptHash(const CScriptID&) constructor (fanquake)
d6ffa22e287a593aec0669860f0b61a9bdaa9262 fuzz: remove unused MockedDescriptorConverter::IdIsXpub (fanquake)
664c2f4600d87cd94100ff03a29cf8178704a678 logging: remove unused Logger::AddCategoryLogLevel (fanquake)
fb7a3aef1bc89cf26af7fee6d5425c3d0689a059 addrman: remove unused AddrMan::Unserialize(AutoFile&) instantiation (fanquake)
54fe34c6b32def9d94692e8f74d56ed12f1acd9d policy: remove unused EXTRA_DESCENDANT_TX_SIZE_LIMIT (fanquake)
71f598018bc8101aaa9f7f496289e43437ea9266 refactor: remove unused BinarySemaphoreGrant alias (fanquake)
a781e4828983b4038fe8c5d98a097d8ade2853dc qt: remove unused TrafficGraphWidget::getGraphRange (fanquake)
8a8a46d7b6164981363dbb185db3a895f4193078 qt: remove unused OptionsDialog::proxyIpChecks signal (fanquake)
2fecbfd1e159f2a5eae6ec8a97da3684ef617110 qt: remove unused QValueComboBox::setRole (fanquake)
50fb338f94e46686d16cc36bfd55fb57d5f116c7 qt: remove unused ClientModel::isReleaseVersion (fanquake)
101345feaa0043caeb79b55f5a6354d85a7b0183 script: remove unused FillableSigningProvider::GetCScripts (fanquake)
5eddbb45c2ad9a293ea0cb796189b794293bc887 ipc: remove unused FooImplementation::passBlockState (fanquake)
159596418166e397fafdbf1e1a090ef0578afd18 test: remove unused GetMockableDatabase declaration (fanquake)
98136193f6b75b82facfda90b46c9d99e0e82932 kernel: remove unused MemPoolLimits::NoLimits (fanquake)
d7c16aa057ecce0743ce2cd79bebf74f757b2dba netbase: remove unused Proxy::GetFamily (fanquake)
d28d1a980999f346eb1994e361c0ecc0dd081d06 span: remove unused MakeWritableUCharSpan (fanquake)

Pull request description:

Part of #36167.

ACKs for top commit:
stickies-v:
ACK 570c4a184f49b6d71bc581ae694b969a91cf2510
sedited:
ACK 570c4a184f49b6d71bc581ae694b969a91cf2510

Tree-SHA512: 2249fe91098006228006b30e4c18b204fb5d6dfefea8d175a2d8ea45409220df5c62c6618125b69e8af3b4f775269c11cf424a429cc3fe93629e961420f8eeec

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing boundaryaccess controlfuzzing or regression evidencesigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit is a routine cleanup that removes unused code, unused compiler warning flags, and stale declarations from Bitcoin Core. None of the changes alter active behavior, fix bugs, or introduce security-sensitive logic. It is purely a refactoring and build-hygiene change.

AI review queuedMerge bitcoin/bitcoin#36397: scripted-diff: [wallet] Remove trailing newlines from one-line log messagesby merge-script · 6799119c · Oct 20, 2026 · 14 filesMessage 91 · StrongInformational 19Details
Commit message · merge-script

Merge bitcoin/bitcoin#36397: scripted-diff: [wallet] Remove trailing newlines from one-line log messages

fa0c552cc5abdd0a7e7f2c9cfc1491240494f352 wallet: Reject trailing newline in format strings (MarcoFalke)
fada75ccb05575e01c18bd4b6b28d41a3c2cd87c util: Add option to reject trailing newline in format strings (MarcoFalke)
fa57d5244b3cdc151e01d7dd02a5e363bf801bcb scripted-diff: [wallet] Remove trailing newlines from one-line log messages (MarcoFalke)
fa6c7942ad8e159f240194d2d290e9d64812761a wallet: Remove inconsistent and redundant trailing error newlines (MarcoFalke)
fa89aeec855b774e8ef37b31ac2b6b83c1d263e8 test: [move-only] Move test_LogEscapeMessage to logging tests (MarcoFalke)

Pull request description:

This is a low-prio style cleanup for years, but:

* It is tedious and possibly distracting to do it manually when touching the line for other reasons.
* The topic recently came up again when discussing log injection (https://github.com/bitcoin/bitcoin/pull/35833#issuecomment-5113804332)

So I wonder if a simple scripted-diff can cover the bulk of the changes now, with hopefully little conflicts with reviewed pull requests.

(Removing the trailing newlines from the remaining log messages is trivial and can be done in a later pull)

ACKs for top commit:
l0rinc:
ACK fa0c552cc5abdd0a7e7f2c9cfc1491240494f352
sedited:
ACK fa0c552cc5abdd0a7e7f2c9cfc1491240494f352

Tree-SHA512: 48b5fa1f25797052e4a0e66efe7c59085309ba56524d001ac35089a579cf08a7b8a0908de54290f3b4867a012f097c00f2f8d57723d15c9da6e09eb902bd8ed3

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: broader security terminologysecond-pass: security-sensitive path
AI analysis · Informational 19/100

This is a code-cleanup change for Bitcoin Core's wallet logging. It removes manual newline characters from the end of one-line log messages and adds a compile-time check that prevents wallet log format strings from ending in a newline. The change is defensive: it reduces the chance that a future log message could accidentally inject fake log lines or confuse log parsing, but it does not by itself fix an active security bug.

AI review queuedMerge bitcoin/bitcoin#36553: test: Add missing sync_mempools in wallet_conflicts.pyby merge-script · 020fcb28 · Oct 20, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36553: test: Add missing sync_mempools in wallet_conflicts.py

fa1061481bb1cb6bb7d5ca7ea6674f349f2baed8 test: Add missing sync_mempools in wallet_conflicts.py (MarcoFalke)
fa3986f5c1d512f5e8a320ccbbd84bde3c9e2575 test: Remove redundant sync call after self.generate called sync_all (MarcoFalke)

Pull request description:

Fix https://github.com/bitcoin/bitcoin/actions/runs/38882212577/job/116911393791?pr=36545#step:11:3700:

```
2026-10-16T09:48:01.724540Z TestFramework (INFO): Test a scenario where a transaction has a mempool conflict
2026-10-16T09:48:02.100649Z TestFramework (INFO): Test scenario where a mempool conflict is removed
2026-10-16T10:28:02.397150Z TestFramework (ERROR): Unexpected exception:
Traceback (most recent call last):
File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 146, in main
self.run_test()
~~~~~~~~~~~~~^^
File "/home/runner/work/_temp/build_ ₿🧪_/test/functional/wallet_conflicts.py", line 38, in run_test
self.test_mempool_conflict()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/runner/work/_temp/build_ ₿🧪_/test/functional/wallet_conflicts.py", line 202, in test_mempool_conflict
self.generate(self.nodes[2], 1)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 668, in generate
sync_fun() if sync_fun else self.sync_all()
~~~~~~~~~~~~~^^
File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 750, in sync_all
self.sync_mempools(nodes)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 743, in sync_mempools
raise AssertionError("Mempool sync timed out after {}s:{}".format(
...<2 lines>...
))
AssertionError: Mempool sync timed out after 2400s:
{'ed4cecf5b16f82ce48b2c56b6a20feac3f83e6043b262a74f356e07a451dda34'}
{'47de6fdef43b22320dc0114c2104e3dee58de9591799ff5e48ff29efaa5cf88f', 'ed4cecf5b16f82ce48b2c56b6a20feac3f83e6043b262a74f356e07a451dda34'}
{'ed4cecf5b16f82ce48b2c56b6a20feac3f83e6043b262a74f356e07a451dda34'}
```

by adding the missing `sync_mempools`.

ACKs for top commit:
fanquake:
ACK fa1061481bb1cb6bb7d5ca7ea6674f349f2baed8

Tree-SHA512: 526a216228f87976c5a41b8fffb8eab0728d23c70c642a54ed2f2cc58c93875119c5c294b151bab5ff70994f657091a6db879f4aae63b0cde356466685fcd084

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 15/100

This commit fixes a flaky automated test in Bitcoin Core. It adds missing mempool synchronization calls in a wallet-conflict test and removes a couple of redundant block-sync calls. There is no change to production code, no security vulnerability, and no risk to users' funds or node safety.

AI review queuedMerge bitcoin/bitcoin#36341: wallet: return error from bitcoin-wallet createby merge-script · ebb53105 · Oct 19, 2026 · 2 filesMessage 81 · StrongInformational 24Details
Commit message · merge-script

Merge bitcoin/bitcoin#36341: wallet: return error from bitcoin-wallet create

f64d33672fe1488b49254a634cbecfd9ce4ca179 wallet: return error from bitcoin-wallet create (Kanan)

Pull request description:

`bitcoin-wallet create` exits with status 0 even when the wallet couldn't be created:

```
$ bitcoin-wallet -regtest -wallet=w1 create # first time, ok
$ bitcoin-wallet -regtest -wallet=w1 create
Failed to create database path '.../regtest/wallets/w1'. Database already exists.
$ echo $?
0
```

In `ExecuteWalletToolFunc` the `create` branch only does something when `MakeWallet` succeeds and then falls through to `return true`. The other commands (`info`, `dump`, `createfromdump`) all return false on failure. So scripts that check the exit code think the wallet was created.

This returns false when `MakeWallet` fails, the same way `info` does. The added check in `tool_wallet.py` runs `create` on the existing wallet `foo` and expects exit code 1. It fails on master (`not(0 == 1)`) and passes with the fix.

ACKs for top commit:
maflcko:
lgtm ACK f64d33672fe1488b49254a634cbecfd9ce4ca179
sedited:
ACK f64d33672fe1488b49254a634cbecfd9ce4ca179

Tree-SHA512: aa2404a4bea38ca53da989d0b09e13a6b48dccfd49fa0e70a268c325241226693a8ca6ef94fb35cc0cca2cc66a066dcf90adfc254e972e4b9b23c047adefaf3f

81/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
Why it was queued
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 24/100

This is a small reliability fix for the bitcoin-wallet command-line tool. Previously, when you tried to create a wallet that already existed, the tool printed an error message but still exited with status 0, which is the code normally used for success. Scripts and automated tools checking the exit code would therefore incorrectly think the command succeeded. The patch makes the tool return a non-zero exit code on failure, matching the behavior of other wallet tool commands. There is no security vulnerability allowing theft, remote attack, or code execution.

Security candidateMerge bitcoin/bitcoin#36339: wallet: avoid int overflow in listtransactionsby merge-script · 3983b582 · Oct 19, 2026 · 2 filesMessage 96 · StrongHigh 74Details
Commit message · merge-script

Merge bitcoin/bitcoin#36339: wallet: avoid int overflow in listtransactions

9cff82fd5b15bc2aa2c7778b61212876433a8219 wallet: avoid int overflow in listtransactions (Kanan)

Pull request description:

`listtransactions` adds `count` and `skip` as `int`. Each one is checked to be non-negative, but their sum can still go past INT_MAX:

```
bitcoin-cli -regtest listtransactions "*" 2147483647 1
```

On master this crashes the node. The overflowed sum is negative, so the loop stops after the first entry. The clamp after the loop overflows the same way and doesn't fix `nCount`, so `push_backV` gets an iterator range about 2^31 elements before `rend()`. UBSan reports `signed integer overflow: 1 + 2147483647` at transactions.cpp:584, and ASan then reports a BUS error in `UniValue::push_backV`.

This parses `count` and `skip` as `uint32_t` through `self.Arg` (which also handles the defaults and rejects negative values, so the manual checks go away) and adds them up in 64 bits, where the sum can't overflow. The functional test calls `listtransactions` with count + skip above INT_MAX and up to UINT32_MAX and checks the results match a normal-sized request. It times out on master (the node crashes) and passes with the fix. I also ran it on an ASan/UBSan build.

`listrawtransactions` counts differently and isn't affected.

ACKs for top commit:
maflcko:
lgtm ACK 9cff82fd5b15bc2aa2c7778b61212876433a8219
sedited:
ACK 9cff82fd5b15bc2aa2c7778b61212876433a8219

Tree-SHA512: 0068951efb724cf5551238de1c6b5d254b66594f9fe8878cf5bb49026e1624a8db6dc87eee23dfed38fc7620cef2933817e82ceb7f8072f8f89911f50af2e607

96/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queued
memory safetysigning or wallet pathmerge-commit duplicate discount
AI analysis · High 74/100

This patch fixes a bug in Bitcoin Core's `listtransactions` RPC command. When a user asked for a very large number of transactions plus a large skip value, the wallet code added two integers together and overflowed, producing a negative number. That negative number was then used as a memory range, causing the node to crash. The fix reads the values as unsigned 32-bit integers and adds them in 64-bit arithmetic so the sum cannot overflow, and removes the now-redundant manual negative checks.

Security candidateMerge bitcoin/bitcoin#36231: test: add pow tests covering live mutantsby merge-script · 368c1382 · Oct 19, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36231: test: add pow tests covering live mutants

e6975adf58c354dbd167b419ad7aadc7b8053af6 test: cover non-retarget heights in PermittedDifficultyTransition (ViniciusCestarii)
a9873943e259b23884fb4295591a82168c831026 test: cover lower bound rounding in PermittedDifficultyTransition (ViniciusCestarii)
7834db23914a3faa3660cb609144cd1c345a1ef3 test: cover negative timespan in CalculateNextWorkRequired (ViniciusCestarii)
1811735255b98257e7bf385325599c8d9bb69ad0 test: cover first block time selection in GetNextWorkRequired (ViniciusCestarii)

Pull request description:

Kills 4 live mutants on pow.cpp found with https://github.com/ViniciusCestarii/mutant-harness. The first 2 affect consensus. The third affect header sync and could stall IBD. The forth cover header sync hardening against DoS. They are:

pow.cpp (killed by 1811735255b98257e7bf385325599c8d9bb69ad0):

```diff
diff --git a/src/pow.cpp b/src/pow.cpp
index 9a9f4e5..9872b2c 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -44,7 +44,7 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
const CBlockIndex* pindexFirst = pindexLast->GetAncestor(nHeightFirst);
assert(pindexFirst);

- return CalculateNextWorkRequired(pindexLast, pindexFirst->GetBlockTime(), params);
+ return CalculateNextWorkRequired(pindexLast, pindexFirst->GetMedianTimePast(), params);
}

unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nFirstBlockTime, const Consensus::Params& params)
```

pow.cpp (killed by 7834db23914a3faa3660cb609144cd1c345a1ef3):

```diff
diff --git a/src/pow.cpp b/src/pow.cpp
index 9a9f4e5..1917b7b 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -53,7 +53,7 @@ unsigned int CalculateNextWorkRequired(const CBlockIndex* pindexLast, int64_t nF
return pindexLast->nBits;

// Limit adjustment step
- int64_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
+ uint32_t nActualTimespan = pindexLast->GetBlockTime() - nFirstBlockTime;
if (nActualTimespan < params.nPowTargetTimespan/4)
nActualTimespan = params.nPowTargetTimespan/4;
if (nActualTimespan > params.nPowTargetTimespan*4)
```

pow.cpp (killed by a9873943e259b23884fb4295591a82168c831026):

```diff
diff --git a/src/pow.cpp b/src/pow.cpp
index 9a9f4e5..028fa9f 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -124,11 +124,8 @@ bool PermittedDifficultyTransition(const Consensus::Params& params, int64_t heig
smallest_difficulty_target = pow_limit;
}

- // Round and then compare this new calculated value to what is
- // observed.
- arith_uint256 minimum_new_target;
- minimum_new_target.SetCompact(smallest_difficulty_target.GetCompact());
- if (minimum_new_target > observed_new_target) return false;
+ // Compare this new calculated value to what is observed.
+ if (smallest_difficulty_target > observed_new_target) return false;
} else if (old_nbits != new_nbits) {
return false;
}
```

pow.cpp (killed by e6975adf58c354dbd167b419ad7aadc7b8053af6):

```diff
diff --git a/src/pow.cpp b/src/pow.cpp
index 9a9f4e5..ef2e788 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -129,8 +129,6 @@ bool PermittedDifficultyTransition(const Consensus::Params& params, int64_t heig
arith_uint256 minimum_new_target;
minimum_new_target.SetCompact(smallest_difficulty_target.GetCompact());
if (minimum_new_target > observed_new_target) return false;
- } else if (old_nbits != new_nbits) {
- return false;
}
return true;
}
```

Recommend reviewing per commit.

ACKs for top commit:
brunoerg:
ACK e6975adf58c354dbd167b419ad7aadc7b8053af6
sedited:
ACK e6975adf58c354dbd167b419ad7aadc7b8053af6

Tree-SHA512: da29cf0226393a870e5c0bb8b228143abf124a905c70caf1006830854a9ac1f26b087a0c65570c8c0661d5a8db67ff91c22accb1d7ed5d4f5d1597ef1d66fe5a

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
defensive validationconsensus or confidential-proof validationmerge-commit duplicate discount
AI analysis · Informational 15/100

This commit only adds new test cases to Bitcoin Core's proof-of-work test file. It does not change any production code. The tests are designed to detect if future code changes accidentally break subtle consensus rules around difficulty retargeting. There is no vulnerability being fixed here.

AI review queuedMerge bitcoin/bitcoin#36545: test: Fix intermittent issue in p2p_initial_headers_sync.pyby merge-script · 71fa0439 · Oct 19, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script

Merge bitcoin/bitcoin#36545: test: Fix intermittent issue in p2p_initial_headers_sync.py

fad7637529426f058a3c2409dd137009b14622a4 test: Fix intermittent issue in p2p_initial_headers_sync.py (MarcoFalke)

Pull request description:

Fixes https://github.com/bitcoin/bitcoin/actions/runs/38697071260/job/116296055487?pr=36537#step:11:5104:

```
test 2026-10-15T07:19:58.731108Z TestFramework (INFO): Check that noban peer1 is not disconnected
test 2026-10-15T07:19:58.731159Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:12392: msg_ping(nonce=00000000)
test 2026-10-15T07:19:58.731184Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:12392: msg_ping(nonce=00000002)
node0 2026-10-15T07:19:58.731236Z (mocktime: 2026-10-15T07:48:45Z) [http.01] [httpserver.cpp:1318] [MaybeSendBytesFromBuffer] [http] Sent 148 bytes to client 127.0.0.1:57508 (id=0)
node0 2026-10-15T07:19:58.731307Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [logging/timer.h:58] [Log] [lock] ContendedLock: lock contention connman.m_nodes_mutex, ./net.h:1876 started
node0 2026-10-15T07:19:58.731317Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [logging/timer.h:58] [Log] [lock] ContendedLock: lock contention connman.m_nodes_mutex, ./net.h:1876 completed (0μs)
node0 2026-10-15T07:19:58.731332Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net_processing.cpp:3836] [ProcessMessage] [net] received: ping (8 bytes) peer=0
node0 2026-10-15T07:19:58.731338Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net.cpp:4220] [PushMessage] [net] sending pong (8 bytes) peer=0
node0 2026-10-15T07:19:58.731365Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net.cpp:4220] [PushMessage] [net] sending ping (8 bytes) peer=0
test 2026-10-15T07:19:58.731377Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:12392: msg_pong(nonce=00000000)
node0 2026-10-15T07:19:58.731388Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net_processing.cpp:6499] [SendMessages] Timeout downloading headers from noban peer, not disconnecting peer=0
node0 2026-10-15T07:19:58.731402Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net.cpp:4220] [PushMessage] [net] sending ping (8 bytes) peer=1
node0 2026-10-15T07:19:58.731421Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net.cpp:4220] [PushMessage] [net] sending getheaders (69 bytes) peer=1
node0 2026-10-15T07:19:58.731441Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net_processing.cpp:6151] [SendMessages] [net] initial getheaders (0) to peer=1
node0 2026-10-15T07:19:58.731461Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net_processing.cpp:3836] [ProcessMessage] [net] received: ping (8 bytes) peer=0
node0 2026-10-15T07:19:58.731466Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net.cpp:4220] [PushMessage] [net] sending pong (8 bytes) peer=0
test 2026-10-15T07:19:58.731579Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:12392: msg_ping(nonce=a011607af5f6e69c)
test 2026-10-15T07:19:58.731607Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:12392: msg_pong(nonce=a011607af5f6e69c)
test 2026-10-15T07:19:58.731633Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:12392: msg_pong(nonce=00000002)
node0 2026-10-15T07:19:58.731777Z (mocktime: 2026-10-15T07:48:45Z) [http] [httpserver.cpp:971] [Receive] [http] Received 339 bytes from 127.0.0.1:57508 (id=0): total=3476 buffered=339
node0 2026-10-15T07:19:58.731798Z (mocktime: 2026-10-15T07:48:45Z) [http] [httpserver.cpp:1135] [TryReadRequest] [http] Received a POST request for / from 127.0.0.1:57508 (id=0)
node0 2026-10-15T07:19:58.731833Z (mocktime: 2026-10-15T07:48:45Z) [http.00] [rpc/request.cpp:246] [parse] [rpc] ThreadRPCServer method=getpeerinfo user=__cookie__ id=32
node0 2026-10-15T07:19:58.732118Z (mocktime: 2026-10-15T07:48:45Z) [http.00] [httpserver.cpp:637] [Send] [http] HTTPResponse (status code: 200 size: 2260) added to send buffer for client 127.0.0.1:57508 (id=0)
test 2026-10-15T07:19:58.732309Z TestFramework (INFO): Check that exactly 1 of {peer1, peer2} receives a getheaders
test 2026-10-15T07:19:58.732370Z TestFramework (ERROR): Unexpected exception:
Traceback (most recent call last):
File "/home/runner/work/_temp/test/functional/test_framework/test_framework.py", line 146, in main
self.run_test()
~~~~~~~~~~~~~^^
File "/home/runner/work/_temp/build_ ₿🧪_/test/functional/p2p_initial_headers_sync.py", line 182, in run_test
self.test_noban_peer_timeout()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/home/runner/work/_temp/build_ ₿🧪_/test/functional/p2p_initial_headers_sync.py", line 177, in test_noban_peer_timeout
self.assert_single_getheaders_recipient([peer1, peer2])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/home/runner/work/_temp/build_ ₿🧪_/test/functional/p2p_initial_headers_sync.py", line 66, in assert_single_getheaders_recipient
assert_equal(count, 1)
~~~~~~~~~~~~^^^^^^^^^^
File "/home/runner/work/_temp/test/functional/test_framework/util.py", line 95, in assert_equal
raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
AssertionError: not(0 == 1)
test 2026-10-15T07:19:58.733190Z TestFramework (DEBUG): Closing down network thread
node0 2026-10-15T07:19:58.733256Z (mocktime: 2026-10-15T07:48:45Z) [http.00] [httpserver.cpp:1318] [MaybeSendBytesFromBuffer] [http] Sent 2260 bytes to client 127.0.0.1:57508 (id=0)
test 2026-10-15T07:19:58.733311Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:58180: msg_ping(nonce=39768d79544b5e40)
test 2026-10-15T07:19:58.733337Z TestFramework.p2p (DEBUG): Send message to 127.0.0.1:58180: msg_pong(nonce=39768d79544b5e40)
test 2026-10-15T07:19:58.733367Z TestFramework.p2p (DEBUG): Received message from 127.0.0.1:58180: msg_getheaders(locator=CBlockLocator(vHave=[7041830694386478471858881810674310864173988660927928131397671070347943617030]), stop=0000000000000000000000000000000000000000000000000000000000000000)
node0 2026-10-15T07:19:58.733447Z (mocktime: 2026-10-15T07:48:45Z) [msghand] [net_processing.cpp:3836] [ProcessMessage] [net] received: pong (8 bytes) peer=0
test 2026-10-15T07:19:58.733502Z TestFramework.p2p (DEBUG): Closed connection to: 127.0.0.1:58180
node0 2026-10-15T07:19:58.733536Z (mocktime: 2026-10-15T07:48:45Z) [net] [net.cpp:2236] [SocketHandlerConnected] [net] socket closed, disconnecting peer=1
node0 2026-10-15T07:19:58.733546Z (mocktime: 2026-10-15T07:48:45Z) [net] [net.cpp:567] [CloseSocketDisconnect] [net] Resetting socket for peer=1
node0 2026-10-15T07:19:58.733596Z (mocktime: 2026-10-15T07:48:45Z) [net] [net_processing.cpp:1859] [FinalizeNode] [net] Cleared nodestate for peer=1
test 2026-10-15T07:19:58.783870Z TestFramework (INFO): Not stopping nodes as test failed. The dangling processes will be cleaned up later.
```

Diff to reproduce:

```diff
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index beec44f55d..85b1e88161 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -87,2 +87,3 @@
#include <span>
+#include <thread>
#include <typeinfo>
@@ -5233,2 +5234,7 @@ void PeerManagerImpl::ProcessMessage(Peer& peer, CNode& pfrom, const std::string
MakeAndPushMessage(pfrom, NetMsgType::PONG, nonce);
+ // TEMPORARY: widen the p2p_initial_headers_sync race window after
+ // its second, nonzero ping has been sent but before SendMessages().
+ if (nonce != 0) {
+ std::this_thread::sleep_for(std::chrono::milliseconds{90});
+ }
}
```

Cmd to reproduce:

```
./bld-cmake/test/functional/test_runner.py $(for i in {1..20}; do echo -n "p2p_initial_headers_sync.py ";done) -j $( nproc )
```

(fails before this pull and passes after)

ACKs for top commit:
Crypt-iQ:
tACK fad7637529426f058a3c2409dd137009b14622a4
l0rinc:
lightly tested ACK fad7637529426f058a3c2409dd137009b14622a4

Tree-SHA512: 701c9d75ed68e806f95ddef34b59abbd943288be8f957708d112f9e02e7b370f10f267c1a22946dc38dc6ff20665fdd0ceda19ebfed18660ae6ebbcc779fc90b

91/100 · StrongMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
Why it was queued
merge-commit duplicate discountsecond-pass: broader security terminology
AI analysis · Informational 15/100

This commit fixes a flaky automated test in Bitcoin Core. The test sometimes failed because it checked too quickly whether a network message had been sent. The fix makes the test wait until exactly one peer has received the expected message. There is no change to the actual Bitcoin node software that users run, so this has no security impact on real networks or wallets.