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.
Message quality measures whether a commit identifies its scope, purpose, rationale, testing, and supporting references. It does not change the security-severity score.
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.
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
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
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
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
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
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…
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
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…
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…
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 …
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…
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,…
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
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
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…
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
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…
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…
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…
Expand any commit for its author, full message, clarity score, changed files, triage signals, analysis, and source link.
Security candidateMerge bitcoin/bitcoin#36539: gui: Use PSBT v0by Ava Chow · 5965d476 · Nov 4, 2026 · 8 filesMessage 86 · StrongLow 35Details
Commit message · Ava Chow
Merge bitcoin/bitcoin#36539: gui: Use PSBT v0
3fdc45d1fa2a6f32f251aa6f639a52bbfd5245b0 refactor: psbt: Don't set a default version for PSBT constructor (David Gumberg) 23dcb03a2c6b9fed84896ac4d751ba9e8034a6bf gui: wallet: Use v0 PSBT (David Gumberg)
Pull request description:
This fixes: https://github.com/bitcoin/bitcoin/issues/36518
There is no test added here for the bump fee PSBT's being v0, since there aren't any existing tests for watch only wallet feebumping in the GUI. If reviewers insist on this I can add it, but I wanted to keep the diff minimal. I have tested this manually.
AFAIU for the external signer stuff it shouldn't matter much whether it's v0 or v2, since users are very unlikely to be using HWI software that doesn't speak v0, but out of caution I've set the external signer PSBT to v0 for the GUI.
_This PR originally took the approach of adding a checkbox, ([davidgumberg/gui/2026-10-15-psbt-gui](https://github.com/davidgumberg/gui/tree/2026-10-15-psbt-gui)), but this was dropped to simplify backporting past string freeze._
_LLM Disclosure: The previous approach was drafted using an LLM, but this branch was written by me. I used an LLM to explore adding a fee bump watchonly GUI test, and decided against it._
ACKs for top commit: Sjors: ACK 3fdc45d1fa2a6f32f251aa6f639a52bbfd5245b0 achow101: ACK 3fdc45d1fa2a6f32f251aa6f639a52bbfd5245b0 w0xlt: crACK 3fdc45d1fa2a6f32f251aa6f639a52bbfd5245b0
✓ 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 boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 35/100
This change makes the Bitcoin Core graphical wallet produce older PSBT v0 files instead of PSBT v2 in several common user flows (creating unsigned transactions, bumping fees). PSBT v2 is newer and not supported by some older external signer tools/hardware wallet software. By defaulting to v0 in the GUI, the wallet stays compatible with more hardware signing tools. The change also removes the automatic default version from the PSBT constructor so callers must explicitly choose a version. This is a compatibility/usability fix, not a fix for theft-of-funds or remote code execution.
Security candidateMerge bitcoin/bitcoin#36686: test: cover cumulative input value range in CheckTxInput tests.by merge-script · a0ebf34b · Nov 4, 2026 · 1 fileMessage 96 · StrongInformational 14Details
Commit message · merge-script
Merge bitcoin/bitcoin#36686: test: cover cumulative input value range in CheckTxInput tests.
98f9eb6afdfd2bb1cd2872bd7d2eb439ec2043a1 test: cover negative input in CheckTxInputs (KY-U) 133714d1695bc40277b213afd252c3e320cac73e test: cover cumulative input value range in CheckTxInputs (KY-U) f8c6cd84e08043f206ca338d0ba7e4dc8bef5214 test: support multiple inputs in CheckTxInputs test helper (KY-U)
Pull request description:
In `Consensus::CheckTxInputs`, the inputs are invalid if, for every input coin, either `coin.out.nValue` or `nValueIn` is out of range. However, the current `checktxinputs_invalid_transactions_test` only covers cases with one input, so the sum `nValueIn` is always equal to `coin.out.nValue`, leaving the [following mutant](https://mutanthub.space/mutants/275) alive. ```diff --- a/src/consensus/tx_verify.cpp +++ b/src/consensus/tx_verify.cpp @@ -189,7 +189,7 @@ bool Consensus::CheckTxInputs(const CTransaction& tx, TxValidationState& state,
// Check for negative or overflow input values nValueIn += coin.out.nValue; - if (!MoneyRange(coin.out.nValue) || !MoneyRange(nValueIn)) { + if (!MoneyRange(coin.out.nValue) && !MoneyRange(nValueIn)) { return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-txns-inputvalues-outofrange"); } } ``` https://github.com/bitcoin/bitcoin/pull/36686/commits/f8c6cd84e08043f206ca338d0ba7e4dc8bef5214 adds support for multiple inputs in the test helper.
https://github.com/bitcoin/bitcoin/pull/36686/commits/133714d1695bc40277b213afd252c3e320cac73e adds a test case with multiple valid inputs, whose sum exceed `MAX_MONEY`, while also having `nValueIn` != `coin.out.nValue`, killing the mutant.
https://github.com/bitcoin/bitcoin/pull/36686/commits/98f9eb6afdfd2bb1cd2872bd7d2eb439ec2043a1 adds a test for uncovered negative input case.
ACKs for top commit: mercie-ux: reACK 98f9eb6afdfd2bb1cd2872bd7d2eb439ec2043a1 ViniciusCestarii: ACK 98f9eb6afdfd2bb1cd2872bd7d2eb439ec2043a1 nice! sedited: ACK 98f9eb6afdfd2bb1cd2872bd7d2eb439ec2043a1
✓ 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 safetyconsensus or confidential-proof validationsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 14/100
This commit only adds new test cases to Bitcoin Core's test suite. It does not change any production consensus, validation, or networking code. The tests verify that an existing check in the transaction validation logic correctly rejects transactions with out-of-range input values, including cases with multiple inputs. There is no security vulnerability being fixed here—only test coverage is being improved.
Merge bitcoin/bitcoin#36685: wallet: export replaces_txid and replaced_by_txid
bff0a2fabfeceeb739c0d545cb9d45e2a7da43f0 wallet: export replaces_txid and replaced_by_txid (Vasil Dimov)
Pull request description:
Export the fields `replaces_txid` and `replaced_by_txid` from `wallet::CWalletTx` to `interfaces::WalletTx`.
In May 2026 https://github.com/bitcoin-core/gui-qml/commit/f4ff2b8db93cea7ce16c1b914bd4a89393a5810c hooked a usage of `interfaces::WalletTx::value_map["replaces_txid"]` and `interfaces::WalletTx::value_map["replaced_by_txid"]` into the QML GUI.
Then, in June 2026 https://github.com/bitcoin/bitcoin/commit/a2b0bfcd854548820057143f9b5b2213736c5497 removed the map entirely from the main repository, but the `replaces_txid` and `replaced_by_txid` fields were not exposed in `interfaces::WalletTx`. Thus the QML GUI has no access to them.
Export the fields to solve this.
The QT5 GUI never used those.
ACKs for top commit: pseudoramdom: ACK bff0a2fabfeceeb739c0d545cb9d45e2a7da43f0 johnny9: ACK bff0a2fabfeceeb739c0d545cb9d45e2a7da43f0 sedited: ACK bff0a2fabfeceeb739c0d545cb9d45e2a7da43f0
✓ 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 controlsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This commit simply exposes two existing transaction-replacement identifiers (replaces_txid and replaced_by_txid) through an internal wallet interface so that a future QML-based user interface can read them. It is a straightforward data plumbing change with no security implications.
Merge bitcoin/bitcoin#36615: guix: add --no-same-owner to codesign.sh TAR_OPTIONS
d2e5108ea2ddce1952d4db8b42d39a40e3d9f521 guix: add --no-same-owner to codesign.sh TAR_OPTIONS (marcofleon)
Pull request description:
Just ran `guix-codesign` for v32.0 as root, in fanquake's container image ([option 3](https://github.com/bitcoin/bitcoin/blob/master/contrib/guix/INSTALL.md#option-3-using-fanquakes-container-image) in INSTALL.md) and got this error while unpacking the codesigning tarball:
```bash tar: ./detached-sig-create.sh: Cannot change ownership to uid 0, gid 0: Invalid argument tar: ./unsigned/bitcoin-32.0: Cannot change ownership to uid 0, gid 0: Invalid argument tar: ./unsigned/bitcoin-32.0-win64-setup-unsigned.exe: Cannot change ownership to uid 0, gid 0: Invalid argument ... tar: Exiting with failure status due to previous errors ``` Same happens for the macOS files.
When updating guix in https://github.com/bitcoin/bitcoin/pull/34550, `--no-same-owner` was added in `build.sh` (now in `setup.sh`) in 0f323e10759aba4429677d0e1e202bf575b6d664, but not in `codesign.sh`. This PR adds it to `TAR_OPTIONS` in `codesign.sh`. This fixed the issue for me and my hashes match the other attestations for v32.0.
ACKs for top commit: fanquake: ACK d2e5108ea2ddce1952d4db8b42d39a40e3d9f521 willcl-ark: utACK d2e5108ea2ddce1952d4db8b42d39a40e3d9f521
✓ 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 boundaryupdate trustsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 18/100
This is a one-line fix for the Bitcoin Core release-codesigning script used in reproducible builds. When a release signer ran the signing tool as root inside a container, tar failed because it tried to preserve file ownership from the original tarball (root-owned files) but could not assign those owners in the container environment. The patch tells tar not to try to keep the original owners, which lets the signing process finish and lets the signer produce matching release signatures. It is a build-tool reliability fix, not a vulnerability in the Bitcoin network or wallet software.
AI review queuedMerge bitcoin/bitcoin#35492: wallet: fail dump on incomplete writesby merge-script · 2e06f371 · Nov 4, 2026 · 2 filesMessage 81 · StrongLow 43Details
Commit message · merge-script
Merge bitcoin/bitcoin#35492: wallet: fail dump on incomplete writes
385a001f66ad23b3963d5c0acf960b94359c4e21 wallet: commit dump output before success (Velarde) bb2a207d08782b93f77c003287d9b6bf4ea17fa1 wallet: fail dump on incomplete writes (Velarde)
Pull request description:
This makes `bitcoin-wallet dump` fail if writing the dump file does not complete successfully.
Previously, `DumpWallet()` only checked whether the dump file could be opened. If later writes or close failed, the tool could still return success and print the private-key warning, leaving a truncated dump file behind.
The change adds write/close checks while dumping wallet records. If writing fails, the partial dump file is removed and `bitcoin-wallet` returns an error.
ACKs for top commit: maflcko: review with --function-context --ignore-all-space ACK 385a001f66ad23b3963d5c0acf960b94359c4e21 🍵 pablomartin4btc: ACK 385a001f66ad23b3963d5c0acf960b94359c4e21
✓ 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 · Low 43/100
This change fixes a bug in the `bitcoin-wallet dump` command. Previously, if writing the dump file failed partway through (for example, because the disk was full), the tool could still report success and leave behind an incomplete, misleading file. Now the tool checks every write and close operation, reports failure, and deletes the partial file. This is a reliability and data-integrity improvement rather than a remote attack vector.
AI review queuedMerge bitcoin/bitcoin#31507: build: Use clang-cl to build on Windows nativelyby merge-script · cfe5ccea · Nov 4, 2026 · 20 filesMessage 91 · StrongInformational 18Details
Commit message · merge-script
Merge bitcoin/bitcoin#31507: build: Use clang-cl to build on Windows natively
331902f1dda63b5b8e5e9296f9871c358bf5d2b3 doc: Rename `build-windows-msvc.md` to `build-windows-native.md` (Hennadii Stepanov) fe2ffef6bc786e515b9fc99a4bf10792b45c6a91 doc: Add clang-cl release notes (Hennadii Stepanov) 4f1e6de6c44790c3abbaf83dfe09947610520e1e cmake: Drop support for the MSVC compiler (cl.exe) (Hennadii Stepanov) 720f381a264f8a136689bd50b29a78482e3b19f7 Couple `BSWAP_CONSTEXPR` definition to bswap implementation (Hennadii Stepanov) 4d7e07035dfd82730b8b1dcb17bee059e6102800 cmake: Adjust diagnostic flags for clang-cl (Hennadii Stepanov) c4111989e47654db4325fbf3935228bd9385b392 cmake: Link to clang-cl builtins library on Windows (Hennadii Stepanov) d2645f7ed486718d2af39cf5fc50f46bb8503be9 cmake: Always link `bitcoinqt` to `shlwapi` when building on Windows (Hennadii Stepanov)
Pull request description:
Building on Windows using Clang instead of the MS compiler may be beneficial, considering the issues with the latter, as outlined in https://github.com/bitcoin/bitcoin/issues/31456:
> * non-optimized codegen: [build: remove need to test for endianness #29852 (comment)](https://github.com/bitcoin/bitcoin/pull/29852#issuecomment-2049803970) > > * compile failure: [MSVC 17.12.0 internal compiler error #31303](https://github.com/bitcoin/bitcoin/issues/31303) > > * ~legal, but brittle stdlib: [util: Drop boost posix_time in ParseISO8601DateTime #31391 (comment)](https://github.com/bitcoin/bitcoin/pull/31391#issuecomment-2510762011)~ > > * unspecified issue: [refactor: Check translatable format strings at compile-time #31061 (comment)](https://github.com/bitcoin/bitcoin/pull/31061#issuecomment-2531244463)
Additionally, MSVC does not [support](https://learn.microsoft.com/en-us/cpp/assembler/inline/inline-assembler) inline assembly on the ARM and x64 processors.
So this PR: 1. Closes https://github.com/bitcoin/bitcoin/issues/31456 (and addresses https://github.com/bitcoin/bitcoin/issues/14118). 2. Could be an alternative to https://github.com/bitcoin/bitcoin/pull/24773. 3. Closes https://github.com/bitcoin/bitcoin/issues/36153. ---
Additionally, clang-cl: 1. Produces binaries with [better](https://github.com/bitcoin-core/secp256k1/pull/1681) performance. For example:
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
This commit changes Bitcoin Core's Windows build system to use the Clang compiler (clang-cl) instead of Microsoft's own C++ compiler (MSVC/cl.exe). It is a build-toolchain change, not a fix for a security vulnerability in running code. The pull request mentions that MSVC had bugs and missing features, but those are described as development/maintenance problems, not as remotely exploitable flaws. There is no indication this patch fixes an active security issue.
AI review queuedMerge bitcoin/bitcoin#36748: test: Small test sync fixupsby merge-script · 3b5ba5d3 · Nov 4, 2026 · 3 filesMessage 96 · StrongInformational 15Details
Commit message · merge-script
Merge bitcoin/bitcoin#36748: test: Small test sync fixups
fa6f1c00c5fb1c8e51595f387b7c62c7253e89fa test: Use send_self_transfer_chain (MarcoFalke) fa2986921cd53146fb8a1fc9585714a064a137d9 test: Use generateblock with submit=False over manual create_block from tmpl (MarcoFalke) facf4a0ea98ef52f505e4f72eab1b6183df3832f test: Remove redundant sync_blocks (MarcoFalke)
Pull request description:
Just a few random sync style-only test-only fixups. See the commit msgs for the rationales.
ACKs for top commit: musaHaruna: ACK [fa6f1c0](https://github.com/bitcoin/bitcoin/pull/36748/changes/fa6f1c00c5fb1c8e51595f387b7c62c7253e89fa) sedited: ACK fa6f1c00c5fb1c8e51595f387b7c62c7253e89fa
✓ 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
signing or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit only changes Bitcoin Core's internal test scripts. It simplifies how tests create transactions and blocks, and removes a couple of unnecessary synchronization steps. There is no change to the actual Bitcoin node software that users run, so it cannot affect live networks, wallets, or funds.
The last non-test caller was removed in 9b7ec393b8 (#26567). Since then it has only been used by the `tx_in` fuzz target and a helper in `wallet_tests`.
ACKs for top commit: jpk68: ACK 3e2cf63da5090d59218c66dcc9a54c0f8c67e648 l0rinc: lightly tested code review ACK 3e2cf63da5090d59218c66dcc9a54c0f8c67e648 ismaelsadeeq: ACK 3e2cf63da5090d59218c66dcc9a54c0f8c67e648 sedited: ACK 3e2cf63da5090d59218c66dcc9a54c0f8c67e648
✓ 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
fuzzing or regression evidencesigning or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit removes an unused helper function called GetVirtualTransactionInputSize and updates the few remaining callers to use an equivalent calculation directly. It is a routine code cleanup with no security relevance.
Merge bitcoin/bitcoin#36494: wallet: reject unknown options in sendall
702ec9d40f84dfd0ca9bf73e37052c36f3802702 wallet: reject unknown options in sendall (Thomas)
Pull request description:
`sendall` silently ignores unknown keys in its `options` object, including misspelled ones: `input` instead of `inputs` spends all available UTXOs rather than the given ones, and a misspelled `add_to_wallet` or `psbt` can broadcast a transaction the caller asked not to broadcast.
Reject unknown options, like `send`, `fundrawtransaction`, `walletcreatefundedpsbt` and `bumpfee` already do.
ACKs for top commit: maflcko: review ACK 702ec9d40f84dfd0ca9bf73e37052c36f3802702 🐀 Zippo76: tACK 702ec9d40f polespinasa: ACK 702ec9d40f84dfd0ca9bf73e37052c36f3802702
✓ 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 boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Moderate 64/100
This change fixes a bug in Bitcoin Core's `sendall` wallet command where misspelled or unknown options in the options object were silently ignored. For example, typing `input` instead of `inputs` would spend all coins instead of only the chosen ones, and misspelling `add_to_wallet` or `psbt` could broadcast a transaction the user did not want broadcast. The fix makes `sendall` reject unknown or wrongly typed options, matching other wallet commands.
Security candidateMerge bitcoin/bitcoin#35728: rpc: Properly throw on internal I/O errors in GetTransactionby Ryan Ofsky · fb19fed3 · Nov 3, 2026 · 7 filesMessage 91 · StrongLow 43Details
Commit message · Ryan Ofsky
Merge bitcoin/bitcoin#35728: rpc: Properly throw on internal I/O errors in GetTransaction
fad49fd81fcffd1dd9f40320a239881a0881be25 Add doc/release-notes-35728.md (MarcoFalke) fa7d278aad832250e2c1e07ef10afdffee36da4e refactor: Use GetTransaction in ProcessPSBT (MarcoFalke) fa32e607531c712dab33a712127e473086e32f9f rpc: Properly throw on internal FindTx IO errors in ProcessPSBT and GetTransaction (MarcoFalke) faaf4a751c68d57ea21d40fbd66dcbbc69abbbac test: Add test to check RPCs throw on IO errors (MarcoFalke) fad44f18b88fddae160bffb672e12c01c92d6a7f rpc: Return proper error messages from getrawtransaction (MarcoFalke) fa5ad60c32860786251afc9b764deeb9b5fdcf62 test: Add test for getrawtransaction block read errors (MarcoFalke)
Pull request description:
Currently the GetTransaction return value is a nullable transaction pointer, where nullptr represents two different outcomes: I/O error and missing tx.
Reporting a confirmed transaction as missing is wrong, so properly return an error instead.
ACKs for top commit: furszy: ACK fad49fd81fcffd1dd9f40320a239881a0881be25 l0rinc: ACK fad49fd81fcffd1dd9f40320a239881a0881be25 musaHaruna: re-ACK [fad49fd](https://github.com/bitcoin/bitcoin/commit/fad49fd81fcffd1dd9f40320a239881a0881be25) ryanofsky: Code review ACK fad49fd81fcffd1dd9f40320a239881a0881be25. Since last review, `WarnAndThrowErr` takes the format string and arguments directly, and the release note wording is updated. Thanks!
✓ 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 boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 43/100
This Bitcoin Core update fixes a bug where several RPC commands and one REST endpoint would incorrectly tell users a confirmed transaction was missing, when in fact the software had hit a disk-read or index corruption problem. After the patch, these interfaces return a clear internal error instead of a misleading 'not found' result. It is a correctness/reliability fix rather than a remote-code-execution style vulnerability.
Merge bitcoin/bitcoin#36344: wallet: reject duplicate inputs in sendall
654a92a9d3e76f3ff4ec4975f4fbcfba1a6091be wallet: reject duplicate inputs in sendall (Bruce0X)
Pull request description:
`sendall` with the `inputs` option doesn't check for duplicates. Each listed input is added to `total_input_value` in the loop at spend.cpp:1472, so passing the same UTXO twice counts its value twice.
On regtest, with a wallet that has a single 1 BTC UTXO:
- the RPC returns `complete: true` - the committed tx has 2 inputs (the same outpoint twice) and one output of 1.99998230 BTC - it isn't in the mempool, and `testmempoolaccept` rejects it with `bad-txns-inputs-duplicate` - after that, `listunspent` is empty and `getbalances` shows `nonmempool: -1.0` until the tx is abandoned
`send` and `walletcreatefundedpsbt` aren't affected, because `CCoinControl::Select` removes duplicates.
This rejects a duplicated input with `Invalid parameter, duplicated input: <txid>:<vout>` (RPC_INVALID_PARAMETER). The message matches what `createrawtransaction` says for duplicated addresses. The new `sendall_fails_on_duplicate_input` test fails on master ("No exception raised") and passes with the fix. `wallet_send.py` still passes.
ACKs for top commit: l0rinc: ACK 654a92a9d3e76f3ff4ec4975f4fbcfba1a6091be maflcko: review ACK 654a92a9d3e76f3ff4ec4975f4fbcfba1a6091be 🚪 molnard: tACK 654a92a9d3e76f3ff4ec4975f4fbcfba1a6091be
✓ 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 boundarysigning or wallet pathmerge-commit duplicate discount
AI analysis · Low 37/100
This patch fixes a bug in Bitcoin Core's `sendall` wallet RPC command. Previously, if a user accidentally listed the same coin (UTXO) twice in the `inputs` option, the command would create an invalid transaction that counted the coin's value twice. The transaction would be rejected by the network, but it would temporarily confuse the wallet's balance display. The fix now rejects duplicate inputs immediately with a clear error message.
✓ 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 15/100
This is a tiny code cleanup in Bitcoin Core's network handling. It removes an unnecessary second check that 'peer' exists, because the surrounding code already confirmed it exists. There is no functional change and no security risk.
Security candidateMerge bitcoin/bitcoin#36712: fees: prevent divide by zero in CFeeRateby merge-script · 38ece2a9 · Nov 2, 2026 · 3 filesMessage 91 · StrongModerate 60Details
Commit message · merge-script
Merge bitcoin/bitcoin#36712: fees: prevent divide by zero in CFeeRate
f442fa20d437f02518c327736206185bd6f6a1a1 fees: prevent divide by zero in CFeeRate (ismaelsadeeq)
Pull request description:
A CFeeRate with size 0 `GetFeePerK()` and `CFeeRate+=` evaluated `EvaluateFeeDown(1000)` unconditionally, dividing by that zero size and crashing.
Return 0 for an empty fee rate, matching `GetFee()` behaviour, and add minimal unit test coverage.
This was reported by Jacob F Cudney (aragondragon)
ACKs for top commit: pablomartin4btc: re-ACK f442fa20d437f02518c327736206185bd6f6a1a1 polespinasa: re-ACK f442fa20d437f02518c327736206185bd6f6a1a1 musaHaruna: Code review ACK [f442fa2](https://github.com/bitcoin/bitcoin/pull/36712/changes/f442fa20d437f02518c327736206185bd6f6a1a1)
✓ 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 · Moderate 60/100
This commit fixes a divide-by-zero crash in Bitcoin Core's fee-rate calculation. When a transaction fee rate was created with a size of zero, calling certain methods would try to divide by zero and crash the program. The fix makes these methods safely return zero instead, matching the behavior of related code, and adds tests to prevent the crash from coming back.
Security candidateMerge bitcoin/bitcoin#36305: net: Use exclusive P2P listen sockets on Windowsby Hennadii Stepanov · 3581d56b · Nov 2, 2026 · 2 filesMessage 100 · StrongModerate 62Details
Commit message · Hennadii Stepanov
Merge bitcoin/bitcoin#36305: net: Use exclusive P2P listen sockets on Windows
db31a3ad1f75538d07707d373adbfbe90ba8e328 test: check P2P listen port exclusivity (winterrdog) 0dbd271eb4a3263b8b81ccf22876429076bae574 net: use exclusive P2P listen sockets on Windows (winterrdog)
Pull request description:
on Windows, `SO_REUSEADDR` does not carry over the same semantics as on POSIX systems. a second socket can set `SO_REUSEADDR` and bind to a port that is _already in use_ by another process running under the _same_ user account. this means another local process could bind to the P2P listen port and receive incoming connections intended for `bitcoind`.
this matters because the P2P listener is expected to have exclusive ownership of its address and port. allowing another process to bind to it could let that process _intercept_ incoming P2P connections. this is in a similar spirit to #36169, which made the RPC listener exclusive on Windows.
to fix this, we use `SO_EXCLUSIVEADDRUSE` for the P2P listen socket on Windows instead of `SO_REUSEADDR`, while retaining `SO_REUSEADDR` on other platforms. the added test verifies the expected behaviour by attempting to bind a second socket to the same port. on Windows, this fails with `WSAEACCES` (`10013`), which Python exposes as `PermissionError` (an `OSError` subclass).
✓ 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
memory safetycredential or privilege statemerge-commit duplicate discount
AI analysis · Moderate 62/100
This change fixes a Windows-specific networking issue in Bitcoin Core. Previously, another program running on the same Windows computer under the same user account could hijack Bitcoin's peer-to-peer network port, potentially intercepting incoming connections meant for the Bitcoin node. The fix makes the listening socket exclusive on Windows, similar to a change already made for the RPC port. Other operating systems are unaffected because their behavior was already safe.
AI review queuedMerge bitcoin/bitcoin#36618: test: Wait for index sync in all testsby merge-script · e310efb2 · Nov 2, 2026 · 18 filesMessage 91 · StrongInformational 15Details
Commit message · merge-script
Merge bitcoin/bitcoin#36618: test: Wait for index sync in all tests
fa74dc72d942e1628cea3c143bb56eed1457bbce test: refactor: Wait for index sync by default (MarcoFalke) fa8009ba2997a0eb3e6e1a657db507e5a8b8b529 test: Wait for index sync in wallet_fast_rescan.py (MarcoFalke)
Pull request description:
Fixes https://github.com/bitcoin/bitcoin/issues/36564 by adding the missing wait on the index sync.
``` - 2026-10-18T05:06:44.451973Z [http.01] [wallet/scan.cpp:142] [ShouldFetchBlock] [scan] Fast rescan: inspect block 200 [4c063a93914ec0cb1604297f2f601dab9b9342bf073e6b80e1c11efd71714e2e] (WARNING: block filter not found!)
ACKs for top commit: ViniciusCestarii: ACK fa74dc72d942e1628cea3c143bb56eed1457bbce hebasto: ACK fa74dc72d942e1628cea3c143bb56eed1457bbce, the changes are correct.
✓ 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 only changes Bitcoin Core's internal functional test framework. It makes the test harness automatically wait for optional indexes (like transaction index, block filter index, and coin stats index) to finish syncing before continuing tests. It does not change the production Bitcoin node software that users run, so it cannot directly affect real wallets, funds, or network security.
Security candidateMerge bitcoin/bitcoin#36091: test: Add debug output to common tested typesby merge-script · d54844ea · Nov 2, 2026 · 18 filesMessage 91 · StrongInformational 15Details
Commit message · merge-script
Merge bitcoin/bitcoin#36091: test: Add debug output to common tested types
722d08e03980c359bae4e3b65551d6b8ba615a7a test: Convert `BOOST_CHECK` macros with known debug string (rustaceanrob) d735b94803a6d6e1ae8a3716a2ca7b1a63e1ca1e test: Add display `operator<<` overloads to `common.{h,cpp}` (rustaceanrob)
Pull request description:
If the `<<` operator exists, boost can use this as a debug output when a check fails (besides `BOOST_CHECK`). This adds `<<` for types commonly used across the unit tests that do not yet have a display output. Each callsite that uses these types are then updated to use macros that will print the debug output on failure. All of these display strings would be used as part of #35713, but we can also use them with boost today.
What this PR does: - Adds debug output for types used across multiple files, or types that have a clear debug string, and migrates the `BOOST_CHECK` calls. This covers the majority of custom types that did not yet have a debug string.
What this PR does _not_ do: - Migrate `BOOST_CHECK` callsites for types that already _do_ have a debug output (all primitive type comparisons, `CFeeRate`, etc). This would be a much larger refactor and could perhaps be done after. - Add debug output for `std::vector<T>` where `T` is streamable. These can be migrated to `BOOST_CHECK_EQUAL_COLLECTIONS`, but is a similar refactor to the one above. - Add debug output for `std::vector<unsigned char>` and related. Also a large refactor, and could use discussion. - Add debug output for types that would require a `friend` method in the source code (`ByRatio`)
ACKs for top commit: maflcko: review ACK 722d08e03980c359bae4e3b65551d6b8ba615a7a 🍟 ismaelsadeeq: reACK 722d08e03980c359bae4e3b65551d6b8ba615a7a
✓ 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
cryptography-sensitive pathsigning or wallet pathmerge-commit duplicate discount
AI analysis · Informational 15/100
This commit only changes Bitcoin Core's test code. It adds pretty-printing helpers for common data types and updates test assertions to use macros that print more helpful failure messages. There is no change to the actual Bitcoin node software that users run, so it cannot affect live wallets, transactions, or network behavior.
Security candidateMerge bitcoin/bitcoin#36687: test: wait for the node to finish the last block in p2p_ping_ibdby merge-script · 6c01bd0b · Oct 31, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script
Merge bitcoin/bitcoin#36687: test: wait for the node to finish the last block in p2p_ping_ibd
9af82f9872ca1a9e8d4645c537b23af4bc861ed2 test: wait for the node to finish the last block in p2p_ping_ibd (Greg Sanders)
Pull request description:
ProcessBlock() stamps m_last_block_time only after ProcessNewBlock() returns, so getblockcount can show the new height, with nothing in flight, before the stamp is taken. A bumpmocktime in that gap stamps the block with the bumped time, and the final bump then leaves the ping timeout exactly at its boundary, where it never fires. Sync with a ping after the last block, so the node has finished processing it before the clock moves.
The race has been present since the test was added in #36080.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference
This is a fix for a flaky automated test, not a security fix for the Bitcoin Core software itself. The test sometimes failed because it moved the simulated clock forward before the test node had fully finished recording the time of the last downloaded block. The patch adds a small synchronization step so the test waits for the node to finish processing before advancing the clock. It does not change production code or fix any vulnerability that could affect real users.
**Problem:** The four-argument `CBloomFilter` constructor is used by unit tests and the fuzz target to exercise Bloom filter sizing directly. Zero elements make the hash-function calculation divide by zero. The size calculation converts its floating-point result to `unsigned int` before applying the protocol limit, which is undefined for zero or invalid false-positive rates and for valid parameters whose calculated size exceeds the integer range.
**Fix:** Require false-positive rates in `[0, 1]`, construct the existing empty match-all state for zero elements, and use the largest permitted filter for a zero rate with positive elements. Clamp the calculated size before its integer conversion so large valid inputs remain within the protocol limit.
ACKs for top commit: rustaceanrob: Code review ACK c4302ddf806094fcc2b1e21593e25b2038191a07 sedited: ACK c4302ddf806094fcc2b1e21593e25b2038191a07 instagibbs: ACK c4302ddf806094fcc2b1e21593e25b2038191a07
✓ 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 controlfuzzing or regression evidencemerge-commit duplicate discount
AI analysis · Low 35/100
This commit fixes a bug in Bitcoin Core's Bloom filter constructor that could perform undefined math when given unusual inputs, such as zero elements or a zero/invalid false-positive rate. The fix adds input checks and special-case handling so the constructor no longer divides by zero, takes the logarithm of zero, or converts an out-of-range floating-point size to an integer. The affected constructor is used only in tests and fuzzing, not in normal peer-to-peer network code, so the practical risk to live Bitcoin nodes is low.
AI review queuedMerge bitcoin/bitcoin#36011: btcsignals: destroy callbacks on disconnectby merge-script · 862f6038 · Oct 31, 2026 · 2 filesMessage 100 · StrongLow 29Details
Commit message · merge-script
Merge bitcoin/bitcoin#36011: btcsignals: destroy callbacks on disconnect
a318b23131e6df2c64e8fe79cebc8e5babdf8b7f btcsignals: fall back to atomic_load/store without __cpp_lib_atomic_shared_ptr (Ryan Ofsky) f1d786c1ef5d813f61e405370a67df4cc6323885 btcsignals: destroy callbacks eagerly on disconnect (Ryan Ofsky) 7c5571adc46857cfcf77d81b6fc135dee5369749 test: characterize btcsignals callback destruction timing (Ryan Ofsky)
Pull request description:
Currently callback functions connected to signals do not get freed when their `connection::disconnect` method is called or when their associated `scoped_connection` is destroyed. They live as long as the signal does, even if they will never be called, and can only get [garbage collected](https://github.com/bitcoin/bitcoin/blob/0fd515bbb7070a502dd2fe6d16f5f3cbac591283/src/util/btcsignals.h#L240-L241) if new connections are added.
This behavior is different that previous boost signals behavior and causes a [deadlock](https://github.com/bitcoin/bitcoin/actions/runs/31848571315/job/94919834743) on GUI shutdown in #10102 because when the node registers signal callbacks (`handleInitMessage`, etc) that get forwarded to the GUI, the callbacks own `mp::EventLoopRef` references, and if the callbacks aren't freed, the node process can't shut down.
This change restores boost signals behavior freeing callbacks when they are disconnected or when `scoped_connection` objects are destroyed to avoid this problem and make callback lifetimes more predictable.
ACKs for top commit: hodlinator: re-ACK a318b23131e6df2c64e8fe79cebc8e5babdf8b7f sedited: Re-ACK a318b23131e6df2c64e8fe79cebc8e5babdf8b7f
✓ 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
This change fixes a bug in Bitcoin Core's internal signal/callback system where callback functions and the resources they own were not released when disconnected. Previously, disconnected callbacks lingered until the signal itself was destroyed or new connections triggered garbage collection. This caused a real-world deadlock during GUI shutdown because node-to-GUI callbacks held references that prevented the node process from exiting. The patch makes callbacks get destroyed immediately on disconnect (or after any in-flight call finishes), matching the behavior of the older Boost signals library.
AI review queuedMerge bitcoin/bitcoin#36611: test: consolidate mempool constantsby Ryan Ofsky · ab7e668c · Oct 31, 2026 · 10 filesMessage 91 · StrongInformational 15Details
✓ 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 is a test-only cleanup. It moves several hard-coded numbers used in Bitcoin Core's functional tests into a shared helper file so they are defined in one place. No production code, consensus rules, or network behavior were changed.
AI review queuedMerge bitcoin-core/gui#970: Remove legacy BIP70 merchant name from tx details windowby Hennadii Stepanov · 43a33e51 · Oct 30, 2026 · 2 filesMessage 91 · StrongInformational 19Details
Commit message · Hennadii Stepanov
Merge bitcoin-core/gui#970: Remove legacy BIP70 merchant name from tx details window
fa917ddcb1c7a2612dd8e57c3ef75e443cc8a962 Remove legacy BIP70 merchant name from tx details window (MarcoFalke)
Pull request description:
BIP70 is now dead for roughly half a decade. There is no need to print the merchant name in the tx details window, so remove that feature.
The parser has no tests, nor fuzzing, so removing it will likely also fix some parsing issues with corrupt data.
ACKs for top commit: l0rinc: lightweight code review ACK fa917ddcb1c7a2612dd8e57c3ef75e443cc8a962 fanquake: ACK fa917ddcb1c7a2612dd8e57c3ef75e443cc8a962
✓ 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
fuzzing or regression evidencesigning or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 19/100
This commit removes an old feature in the Bitcoin Core wallet's transaction details window that displayed a merchant name for BIP70 payment requests. BIP70 is an outdated payment protocol that is no longer used. The removed code parsed certificate data in a simple, untested way. The change is described as a cleanup, but it also eliminates a small bit of code that handled untrusted data without proper validation.
AI review queueddoc: use doxygen comments for blocks containing @paramby fanquake · 0e9ac2cb · Oct 30, 2026 · 3 filesMessage 73 · AdequateInformational 15Details
Commit message · fanquake
doc: use doxygen comments for blocks containing @param
Plain /* comments are ignored by Doxygen and by clang's -Wdocumentation, so mistakes in them go unnoticed. Also wrap the CoinGrinder ASCII trees in @verbatim so Doxygen keeps their layout.
73/100 · AdequateMessage clarity
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit only changes code comments. It converts plain block comments into Doxygen-style documentation comments (starting with /** instead of /*) so that developer documentation tools can read them. It also wraps ASCII art diagrams in special tags so they keep their formatting. There are no changes to actual program behavior, and no security impact.
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
Why it was queued
signing or wallet pathsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit only fixes documentation comments that describe whether function parameters are inputs, outputs, or both. No actual code logic was changed, so it cannot affect program behavior or introduce a security vulnerability.
AI review queuedMerge bitcoin/bitcoin#36071: refactor: fuzz: remove cost_of_change from coin-grinder fuzz targetby merge-script · d1fb1ba3 · Oct 30, 2026 · 1 fileMessage 91 · StrongInformational 15Details
Commit message · merge-script
Merge bitcoin/bitcoin#36071: refactor: fuzz: remove cost_of_change from coin-grinder fuzz target
5ec6446a1b83e673a51d9e86fa4c0c0e9930fccc refactor: fuzz: remove cost_of_change from coin-grinder fuzz target (yancy)
Pull request description:
coin-grinder selection algorithm does not take cost_of_change as a parameter.
> CoinGrinder doesn’t use coin_params.m_cost_of_change and the comparison of selection results from CoinGrinder, SRD, and Knapsack does not need it either as only the weight of the selections is relevant. So, [line 96](https://github.com/bitcoin/bitcoin/blob/2990bd773551c835ab0b6b59d85730adab2fd428/src/wallet/test/fuzz/coinselection.cpp#L96) in that fuzz test is both incorrect and dead code. It should be removed.
✓ 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
fuzzing or regression evidencesigning or wallet pathmerge-commit duplicate discountsecond-pass: security-sensitive path
AI analysis · Informational 15/100
This commit removes one unused line from a fuzz test (a type of automated test that throws random data at code to find bugs). The removed line set a 'cost of change' value that the CoinGrinder coin-selection algorithm never actually reads. The change only affects test code, not the real Bitcoin wallet, and does not fix or introduce any security issue.
AI review queuedMerge bitcoin/bitcoin#36606: test, bench: construct inputs/outputs declaratively in context-dependent casesby merge-script · 18953bd0 · Oct 29, 2026 · 5 filesMessage 100 · StrongInformational 15Details
Commit message · merge-script
Merge bitcoin/bitcoin#36606: test, bench: construct inputs/outputs declaratively in context-dependent cases
Part of https://github.com/bitcoin/bitcoin/issues/36692 (previously discussed in https://github.com/bitcoin/bitcoin/pull/35994): replace procedural, field-by-field construction of `COutPoint`, `CTxIn` and `CTxOut` in test code with constructor calls.
This PR covers cases that are context-dependent and need manual changes, independent of a scripted-diff for the trivial bulk: - `test/util/transaction_utils`: in `BuildSpendingTransaction`, the `scriptWitness` assignment has to be moved after `vin` is replaced, otherwise the witness is dropped. - `test/util/mining`: in `CreateBlockChain`, the coinbase input's fields were split by the output assignments, with comments that are now kept next to the constructor arguments. - `sigopcount_tests`: `BuildTxs` has the same witness ordering issue as `BuildSpendingTransaction`. - `bench/ccoins_caching`: The `scriptSig`s are built with `<<` appends, and the second output was created by `vout.resize(2)` but never assigned, so it is kept as a null `CTxOut{}`. - `transaction_tests`: `test_Get` builds the same transaction as `bench/ccoins_caching`, with the same `<<` appends and null second output.
**This change is test- and bench-only and does not change the constructed transactions.**
Notes for reviewers: - `CTxIn` has no witness constructor argument, so `scriptWitness` is assigned after `vin` is replaced. - `BuildTxs` is called repeatedly on the same transaction objects. Previously, `resize(1)` kept the existing inputs and only overwrote some of their fields; now they are replaced entirely. The fields that were left untouched by `BuildTxs` are never modified by the test, so the transactions are unchanged. - The null second output in `ccoins_caching` is copied from `test_Get` in `transaction_tests` and looks like an oversight. It is kept here to avoid behaviour changes.
ACKs for top commit: maflcko: review ACK bdf58dd89cc2fe2f0be5ac63755e821661022be6 🍠 purpleKarrot: But even when the approach does not follow the steps 1 and 2, it is a step in the right direction, hence ACK bdf58dd89cc2fe2f0be5ac63755e821661022be6
✓ 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 15/100
This commit is a code cleanup inside Bitcoin Core's tests and benchmarks. It replaces a manual, field-by-field way of building fake transactions with a more direct constructor style. The author explicitly states that the actual transaction data being built is unchanged, and the diff confirms the values and structure stay the same. There is no security issue here.