wallet: make descriptor SPKM mutex non-recursive #35444

Open
w0xlt wants to merge 4 commits from wallet-descriptor-spkm-mutex-19303-simple-index into master AGit
w0xlt commented 2026-06-02 16:33:24 +00:00 (Migrated from github.com)

Part of https://github.com/bitcoin/bitcoin/issues/19303

This PR makes DescriptorScriptPubKeyMan use a non-recursive private mutex by moving locking responsibility into its public methods and using lock-held internal helpers for shared logic.

The change removes external locking of DescriptorScriptPubKeyMan::cs_desc_man, splits recursive internal call paths such as keypool top-up and descriptor updates, and then renames the mutex to m_desc_mutex.

No wallet database format, RPC behavior, keypool semantics, or external signer behavior is intended to change.

Part of https://github.com/bitcoin/bitcoin/issues/19303 This PR makes `DescriptorScriptPubKeyMan` use a non-recursive private mutex by moving locking responsibility into its public methods and using lock-held internal helpers for shared logic. The change removes external locking of `DescriptorScriptPubKeyMan::cs_desc_man`, splits recursive internal call paths such as keypool top-up and descriptor updates, and then renames the mutex to `m_desc_mutex`. No wallet database format, RPC behavior, keypool semantics, or external signer behavior is intended to change.
DrahtBot commented 2026-06-02 16:33:33 +00:00 (Migrated from github.com)

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

External sites

Reviews

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

Type Reviewers
ACK pablomartin4btc
Concept ACK hebasto, polespinasa

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36885 (wallet, rpc: Add analyzedescriptor for multisig setups by pablomartin4btc)
  • #36154 (wallet: fill PSBT_GLOBAL_XPUB by jeanpablojp)
  • #36122 (BIP460: CISA for Taproot key path spends by fjahr)
  • #35998 (wallet: Handle or explicitly ignore WalletBatch write failures by achow101)
  • #35429 (wallet: avoid global access in external signer SPKM by w0xlt)
  • #35302 (Silent Payments: Sending (take 2) by Eunovo)
  • #34969 (fuzz: several improvements to scriptpubkeyman harness by brunoerg)
  • #34520 (refactor: Add nodiscard to functions returning bool+mutable ref by maflcko)

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

LLM Linter (✨ experimental)

Possible internal implementation names in log messages:

  • src/wallet/scriptpubkeyman.cpp: WalletLogPrintf("%s: Detected a used keypool item at index %d, ...", __func__, index) → Remove __func__; function identification is redundant with -logsourcelocations.
  • src/wallet/scriptpubkeyman.cpp: WalletLogPrintf("%s: Topping up keypool failed (locked wallet)", __func__) → Remove __func__; function identification is redundant with -logsourcelocations.

2026-10-30 00:40:51

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/35444 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/35444.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/35444#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [pablomartin4btc](https://github.com/bitcoin/bitcoin/pull/35444#pullrequestreview-5712931740) | | Concept ACK | [hebasto](https://github.com/bitcoin/bitcoin/pull/35444#pullrequestreview-4465420475), [polespinasa](https://github.com/bitcoin/bitcoin/pull/35444#pullrequestreview-5425853804) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--174a7506f384e20aa4161008e828411d--> ### Conflicts Reviewers, this pull request conflicts with the following ones: * [#36885](https://github.com/bitcoin/bitcoin/pull/36885) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36885.svg"></sub> (wallet, rpc: Add analyzedescriptor for multisig setups by pablomartin4btc) * [#36154](https://github.com/bitcoin/bitcoin/pull/36154) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36154.svg"></sub> (wallet: fill PSBT_GLOBAL_XPUB by jeanpablojp) * [#36122](https://github.com/bitcoin/bitcoin/pull/36122) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/36122.svg"></sub> (BIP460: CISA for Taproot key path spends by fjahr) * [#35998](https://github.com/bitcoin/bitcoin/pull/35998) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35998.svg"></sub> (wallet: Handle or explicitly ignore `WalletBatch` write failures by achow101) * [#35429](https://github.com/bitcoin/bitcoin/pull/35429) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35429.svg"></sub> (wallet: avoid global access in external signer SPKM by w0xlt) * [#35302](https://github.com/bitcoin/bitcoin/pull/35302) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/35302.svg"></sub> (Silent Payments: Sending (take 2) by Eunovo) * [#34969](https://github.com/bitcoin/bitcoin/pull/34969) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34969.svg"></sub> (fuzz: several improvements to scriptpubkeyman harness by brunoerg) * [#34520](https://github.com/bitcoin/bitcoin/pull/34520) <sub><img src="https://drahtbot.space/ack_count/bitcoin/bitcoin/34520.svg"></sub> (refactor: Add [[nodiscard]] to functions returning bool+mutable ref by maflcko) If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. <!--5faf32d7da4f0f540f40219e4f7537a3--> ### LLM Linter (✨ experimental) Possible internal implementation names in log messages: - `src/wallet/scriptpubkeyman.cpp`: `WalletLogPrintf("%s: Detected a used keypool item at index %d, ...", __func__, index)` → Remove `__func__`; function identification is redundant with `-logsourcelocations`. - `src/wallet/scriptpubkeyman.cpp`: `WalletLogPrintf("%s: Topping up keypool failed (locked wallet)", __func__)` → Remove `__func__`; function identification is redundant with `-logsourcelocations`. <sup>2026-10-30 00:40:51</sup>
pablomartin4btc (Migrated from github.com) reviewed 2026-06-10 04:16:20 +00:00
pablomartin4btc (Migrated from github.com) left a comment

Concept ACK.

I reviewed the commits individually. The split between public self-locking methods and lock-held helpers makes sense to me, and the external lock removals seem correct now that descriptor accessors return/ use state under their own lock. I left one question around listdescriptors, where two descriptor reads are now done through separate self-locking calls instead of under one caller-held lock, and a minor readability suggestion regarding the cs_desc_man lock removal in addhdkey().

Concept ACK. I reviewed the commits individually. The split between public self-locking methods and lock-held helpers makes sense to me, and the external lock removals seem correct now that descriptor accessors return/ use state under their own lock. I left one question around `listdescriptors`, where two descriptor reads are now done through separate self-locking calls instead of under one caller-held lock, and a minor readability suggestion regarding the `cs_desc_man` lock removal in `addhdkey()`.
pablomartin4btc (Migrated from github.com) commented 2026-06-10 03:52:59 +00:00

I think removing the external lock here is fine now that GetWalletDescriptor() and GetDescriptorString() are self-locking. One subtle difference is that the descriptor metadata and descriptor string are now read under two separate locks instead of one caller-held lock. I don’t see an issue because descriptor state should not normally change concurrently here, but I wanted to double-check that no atomicity across these two reads was intended.

I think removing the external lock here is fine now that `GetWalletDescriptor()` and `GetDescriptorString()` are self-locking. One subtle difference is that the descriptor metadata and descriptor string are now read under two separate locks instead of one caller-held lock. I don’t see an issue because descriptor state should not normally change concurrently here, but I wanted to double-check that no atomicity across these two reads was intended.
pablomartin4btc (Migrated from github.com) commented 2026-06-10 04:09:50 +00:00

Very minor readability nit: would it be clearer to first store the result of GetWalletDescriptor() in a local variable and then call GetPubKeys() on it? That would make it more obvious that the operation is performed on a copied descriptor returned by the accessor, rather than directly on internal SPKM state.

            auto wallet_descriptor = desc_spkm.GetWalletDescriptor(); // locks internally, returns copy
            wallet_descriptor.descriptor->GetPubKeys(pubkeys, extpubs); // operates on the copy
Very minor readability nit: would it be clearer to first store the result of GetWalletDescriptor() in a local variable and then call `GetPubKeys()` on it? That would make it more obvious that the operation is performed on a copied descriptor returned by the accessor, rather than directly on internal SPKM state. ```suggestion auto wallet_descriptor = desc_spkm.GetWalletDescriptor(); // locks internally, returns copy wallet_descriptor.descriptor->GetPubKeys(pubkeys, extpubs); // operates on the copy ```
pablomartin4btc (Migrated from github.com) commented 2026-06-10 03:42:12 +00:00

Nice cleanup: this avoids updating index after a failed destination request.

Nice cleanup: this avoids updating index after a failed destination request.
hebasto (Migrated from github.com) reviewed 2026-06-10 07:13:41 +00:00
hebasto (Migrated from github.com) left a comment

Concept ACK.

Concept ACK.
w0xlt (Migrated from github.com) reviewed 2026-06-17 22:39:31 +00:00
w0xlt (Migrated from github.com) commented 2026-06-17 22:39:31 +00:00

Yes, I also think it is safe because listdescriptors holds wallet->cs_wallet across both calls. Any update that could change either the descriptor metadata or descriptor string also needs cs_wallet, so it cannot run between those two reads.

Yes, I also think it is safe because `listdescriptors` holds `wallet->cs_wallet` across both calls. Any update that could change either the descriptor metadata or descriptor string also needs `cs_wallet`, so it cannot run between those two reads.
w0xlt (Migrated from github.com) reviewed 2026-06-17 23:28:53 +00:00
w0xlt (Migrated from github.com) commented 2026-06-17 23:28:53 +00:00

Done. Thanks.

Done. Thanks.
w0xlt commented 2026-06-18 04:26:45 +00:00 (Migrated from github.com)

Rebased.

Rebased.
DrahtBot commented 2026-07-03 11:20:47 +00:00 (Migrated from github.com)

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

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

Ping for rebase @w0xlt

Ping for rebase @w0xlt
w0xlt commented 2026-09-15 22:55:30 +00:00 (Migrated from github.com)

Rebased.

Rebased.
DrahtBot commented 2026-09-19 17:08:04 +00:00 (Migrated from github.com)

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

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
First-time contributor

🔵 Suggestion · Notification handling is duplicated across six public methods

Every current path notifies correctly, but a future mutator that omits the copied notification block could leave GUI or wallet address-availability state stale.

Location: src/wallet/scriptpubkeyman.cpp:896 (head).

🔵 Suggestion · Lock annotations on three definitions conflict with their declarations

The definitions use EXCLUSIVE_LOCKS_REQUIRED(!m_desc_mutex) while the declarations use LOCKS_EXCLUDED(m_desc_mutex), contrary to the developer notes.

Location: src/wallet/scriptpubkeyman.cpp:1294 (head).

🔵 Suggestion · Three fields lack lock annotations

m_max_cached_index, m_decryption_thoroughly_checked and m_map_signing_providers are accessed under m_desc_mutex, but Clang cannot enforce that requirement.

Location: src/wallet/scriptpubkeyman.h:284 (head).

🔵 Suggestion · First-key-time notification runs while m_desc_mutex is held

A future subscriber that re-enters the SPKM could self-deadlock with the new non-recursive mutex, although the current subscriber does not re-enter.

Location: src/wallet/scriptpubkeyman.cpp:1753 (head).

🔵 Suggestion · The fuzz harness bypasses the wallet-level descriptor update path

The harness now calls the SPKM directly, so it no longer fuzzes the wallet's existing-descriptor update branch or its update-state follow-up work.

Location: src/wallet/test/fuzz/scriptpubkeyman.cpp:119 (head).

Review coverage was incomplete.


Reviewed: 2cde6f953476 · Full review report · Previous reports

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:7ba49ca38b129bc35f71e566efbd136b17ae87b582376d9eebd04f18959e8274:9b5e0237a3fe9e1d05225291551198f07780ddb92e41e55ade9e98c2687fc127 --> <!-- ralph-base:6ed5aad06111177c39f9b9f07a52634476380ae1 --> <!-- ralph-head:2cde6f953476d335113b8bf93dc9920cda633081 --> <!-- ralph-case:2fe9b05cbee09c0cc38885cd847e7562e19d3a4f6d5d41a29f14d5e23fd78031 --> **🔵 Suggestion · Notification handling is duplicated across six public methods** Every current path notifies correctly, but a future mutator that omits the copied notification block could leave GUI or wallet address-availability state stale. Location: [`src/wallet/scriptpubkeyman.cpp:896`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2cde6f953476d335113b8bf93dc9920cda633081/src/wallet/scriptpubkeyman.cpp#L896>) (head). **🔵 Suggestion · Lock annotations on three definitions conflict with their declarations** The definitions use `EXCLUSIVE_LOCKS_REQUIRED(!m_desc_mutex)` while the declarations use `LOCKS_EXCLUDED(m_desc_mutex)`, contrary to the developer notes. Location: [`src/wallet/scriptpubkeyman.cpp:1294`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2cde6f953476d335113b8bf93dc9920cda633081/src/wallet/scriptpubkeyman.cpp#L1294>) (head). **🔵 Suggestion · Three fields lack lock annotations** `m_max_cached_index`, `m_decryption_thoroughly_checked` and `m_map_signing_providers` are accessed under `m_desc_mutex`, but Clang cannot enforce that requirement. Location: [`src/wallet/scriptpubkeyman.h:284`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2cde6f953476d335113b8bf93dc9920cda633081/src/wallet/scriptpubkeyman.h#L284>) (head). **🔵 Suggestion · First-key-time notification runs while `m_desc_mutex` is held** A future subscriber that re-enters the SPKM could self-deadlock with the new non-recursive mutex, although the current subscriber does not re-enter. Location: [`src/wallet/scriptpubkeyman.cpp:1753`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2cde6f953476d335113b8bf93dc9920cda633081/src/wallet/scriptpubkeyman.cpp#L1753>) (head). **🔵 Suggestion · The fuzz harness bypasses the wallet-level descriptor update path** The harness now calls the SPKM directly, so it no longer fuzzes the wallet's existing-descriptor update branch or its update-state follow-up work. Location: [`src/wallet/test/fuzz/scriptpubkeyman.cpp:119`](<https://git.fish.foo/bitcoin/bitcoin/src/commit/2cde6f953476d335113b8bf93dc9920cda633081/src/wallet/test/fuzz/scriptpubkeyman.cpp#L119>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`2cde6f953476`](<https://git.fish.foo/bitcoin/bitcoin/commit/2cde6f953476d335113b8bf93dc9920cda633081>) · [Full review report](<https://review.fish.foo/traces/35444-2cde6f953476d335113b8bf93dc9920cda633081-1753-6.html>) · [Previous reports](<https://review.fish.foo/traces/35444/>)
polespinasa (Migrated from github.com) reviewed 2026-10-06 08:46:04 +00:00
polespinasa (Migrated from github.com) left a comment

concept ACK 3d5e0777ac

concept ACK 3d5e0777ac1a779191562d0fe7ad2b00f2a83f46
polespinasa (Migrated from github.com) commented 2026-10-06 08:42:25 +00:00

in dadc205c80 wallet: stop locking descriptor SPKM externally

After removing this line, no one uses TopUpWithDB anymore. Maybe could also remove the protected wrapper?

in dadc205c806f8bd6e95334035f9be119270f00e6 wallet: stop locking descriptor SPKM externally After removing this line, no one uses `TopUpWithDB` anymore. Maybe could also remove the protected wrapper?
polespinasa (Migrated from github.com) commented 2026-10-06 08:44:40 +00:00

in 2f2cc56578 wallet: split descriptor SPKM locked internals

After removing this, CanUpdateToWalletDescriptor is only used by a fuzz test, but not real code. Consider removing the function entirely.

in 2f2cc56578d867384475eaa52bd1272b5c3e84af wallet: split descriptor SPKM locked internals After removing this, `CanUpdateToWalletDescriptor` is only used by a fuzz test, but not real code. Consider removing the function entirely.
polespinasa (Migrated from github.com) commented 2026-10-06 08:38:54 +00:00

in 2f2cc56578 wallet: split descriptor SPKM locked internals

The commit message claims there is no behavior change in this commit, but this is indeed a behavior change as now it only writes the index on success, before it was writing it in success and in case of failure.

in 2f2cc56578d867384475eaa52bd1272b5c3e84af wallet: split descriptor SPKM locked internals The commit message claims there is no behavior change in this commit, but this is indeed a behavior change as now it only writes the index on success, before it was writing it in success and in case of failure.
w0xlt (Migrated from github.com) reviewed 2026-10-06 19:51:11 +00:00
w0xlt (Migrated from github.com) commented 2026-10-06 19:51:11 +00:00

Done. Thanks.

Done. Thanks.
w0xlt (Migrated from github.com) reviewed 2026-10-06 19:51:14 +00:00
w0xlt (Migrated from github.com) commented 2026-10-06 19:51:14 +00:00

Done. Thanks.

Done. Thanks.
w0xlt (Migrated from github.com) reviewed 2026-10-06 19:51:16 +00:00
w0xlt (Migrated from github.com) commented 2026-10-06 19:51:16 +00:00

Done. Thanks.

Done. Thanks.
DrahtBot commented 2026-10-06 20:26:14 +00:00 (Migrated from github.com)

🚧 At least one of the CI tasks failed.
Task OpenBSD Cross: https://github.com/bitcoin/bitcoin/actions/runs/37521939038/job/112469290765
LLM reason (✨ experimental): CI failed during compilation: scriptpubkeyman.cpp references the undeclared identifier cs_desc_man.

Hints

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

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

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

  • An intermittent issue.

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

<!--85328a0da195eb286784d51f73fa0af9--> 🚧 At least one of the CI tasks failed. <sub>Task `OpenBSD Cross`: https://github.com/bitcoin/bitcoin/actions/runs/37521939038/job/112469290765</sub> <sub>LLM reason (✨ experimental): CI failed during compilation: `scriptpubkeyman.cpp` references the undeclared identifier `cs_desc_man`.</sub> <details><summary>Hints</summary> Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example: * Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch. * A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test. * An intermittent issue. Leave a comment here, if you need help tracking down a confusing failure. </details>
polespinasa (Migrated from github.com) reviewed 2026-10-07 10:14:18 +00:00
polespinasa (Migrated from github.com) commented 2026-10-07 10:11:51 +00:00

in 04b7fc10b4 wallet: make descriptor SPKM mutex non-recursive

Correct me if I am wrong, but SetupDescriptorGeneration, SetupDescriptor and UpdateWithSigningProvider run before the new constructed SPKM is returned so they don't have any signal subscribers yet. This makes calling NotifyCanGetAddressesChanged useless.
Because of that all the change detection logic calling CanGetAddresses_() is also unecessary.

in 04b7fc10b4d0b17abf6c169c1b478ece7568c081 wallet: make descriptor SPKM mutex non-recursive Correct me if I am wrong, but `SetupDescriptorGeneration`, `SetupDescriptor` and `UpdateWithSigningProvider` run before the new constructed SPKM is returned so they don't have any signal subscribers yet. This makes calling `NotifyCanGetAddressesChanged` useless. Because of that all the change detection logic calling `CanGetAddresses_()` is also unecessary.
w0xlt (Migrated from github.com) reviewed 2026-10-08 00:33:26 +00:00
w0xlt (Migrated from github.com) commented 2026-10-08 00:33:26 +00:00

Done. Thanks.

Done. Thanks.
DrahtBot commented 2026-10-08 23:08:32 +00:00 (Migrated from github.com)

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

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

Rebased

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

ACK b38237fa22

Thanks for taking the suggestions.

Verified @polespinasa's feedback is properly addressed and code rebased.

Left a non-blocking comment.

ACK b38237fa22fbcae8c8a763d7af37e85fe1996b4b Thanks for taking the [suggestions](https://github.com/bitcoin/bitcoin/pull/35444#pullrequestreview-4464278390). Verified @polespinasa's feedback is properly addressed and code rebased. Left a non-blocking comment.
pablomartin4btc (Migrated from github.com) commented 2026-10-09 01:49:12 +00:00

One thing, non-blocking: in b3f25031e5 ("wallet: make descriptor SPKM mutex non-recursive"), in desc_spkm_availability_notifications, the sub-test exercising UpdateWalletDescriptor() throwing mid-top-up and still firing a notification before rethrowing (failed_descriptor.SetEnd(5) / HasReason("Could not top up scriptPubKeys") / check_notifications({true})) is gone — was dropping this coverage intentional?

One thing, non-blocking: in b3f25031e5 (_"wallet: make descriptor SPKM mutex non-recursive"_), in `desc_spkm_availability_notifications`, the sub-test exercising `UpdateWalletDescriptor()` throwing mid-top-up and still firing a notification before rethrowing (`failed_descriptor.SetEnd(5)` / `HasReason("Could not top up scriptPubKeys")` / `check_notifications({true})`) is gone — was dropping this coverage intentional?
DrahtBot commented 2026-10-20 08:44:32 +00:00 (Migrated from github.com)

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

<!--cf906140f33d8803c4a75a2196329ecb--> 🐙 This pull request conflicts with the target branch and [needs rebase](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#rebasing-changes).
w0xlt (Migrated from github.com) reviewed 2026-10-30 00:54:41 +00:00
w0xlt (Migrated from github.com) commented 2026-10-30 00:54:41 +00:00
Good catch, thanks. It was dropped unintentionally while addressing https://github.com/bitcoin/bitcoin/pull/35444#discussion_r4205649576.
pablomartin4btc (Migrated from github.com) reviewed 2026-10-30 13:28:28 +00:00
pablomartin4btc (Migrated from github.com) left a comment

re-ACK 2cde6f9534

Since my last review: rebased (I've verified that range-diff shows only the trailing-newline log fixes required after #36397), plus the restored UpdateWalletDescriptor() failing-top-up sub-test in desc_spkm_availability_notifications (thanks for addressing https://github.com/bitcoin/bitcoin/pull/35444#discussion_r4225874270).

re-ACK 2cde6f953476d335113b8bf93dc9920cda633081 Since my last [review](https://github.com/bitcoin/bitcoin/pull/35444#pullrequestreview-5464832550): rebased (I've verified that range-diff shows only the trailing-newline log fixes required after #36397), plus the restored `UpdateWalletDescriptor()` failing-top-up sub-test in `desc_spkm_availability_notifications` (thanks for addressing https://github.com/bitcoin/bitcoin/pull/35444#discussion_r4225874270).
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!35444
No description provided.