Skip to content

Conversation

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 27, 2022

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

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/25722.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #bitcoin-core/gui/877 (gui: Add a menu action to restore then migrate a legacy wallet by achow101)
  • #33152 (Release: Prepare "Open Transifex translations for v30.0" step by hebasto)
  • #33112 (wallet: relax external_signer flag constraints by Sjors)
  • #33043 ([POC] wallet: Enable non-electronic (paper-based) wallet backup with codex32 by w0xlt)
  • #33034 (wallet: Store transactions in a separate sqlite table by achow101)
  • #33033 (wallet, sqlite: Encapsulate SQLite statements in a RAII class by achow101)
  • #32685 (wallet: Allow read-only database access for info and dump commands by PeterWrighten)
  • #30595 (kernel: Introduce initial C header API by TheCharlatan)
  • #29278 (Wallet: Add maxfeerate wallet startup option by ismaelsadeeq)
  • #28690 (build: Introduce internal kernel library by TheCharlatan)
  • #28333 (wallet: Construct ScriptPubKeyMans with all data rather than loaded progressively by achow101)
  • #27865 (wallet: Track no-longer-spendable TXOs separately by achow101)
  • #10102 (Multiprocess bitcoin by ryanofsky)

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.

@ryanofsky ryanofsky marked this pull request as ready for review August 15, 2022 18:18
@ryanofsky
Copy link
Contributor Author

ryanofsky commented Aug 15, 2022

Rebased a09c21c -> e7457d0 (pr/bresult-load.2 -> pr/bresult-load.3, compare) due to conflict with #25616
Rebased e7457d0 -> 874003f (pr/bresult-load.3 -> pr/bresult-load.4, compare) due to conflict with #25504
Rebased 874003f -> d020d0c (pr/bresult-load.4 -> pr/bresult-load.5, compare) on top of newer base PR #25665 tag r/bresult2.18 for derived-to-base conversion bugfix
Rebased d020d0c -> f942d92 (pr/bresult-load.5 -> pr/bresult-load.6, compare) due to silent conflict with #19602
Rebased f942d92 -> 4e53392 (pr/bresult-load.6 -> pr/bresult-load.7, compare) on top of newer version of #25665 (pr/bresult2.21)
Rebased 4e53392 -> f3d1658 (pr/bresult-load.7 -> pr/bresult-load.8, compare) due to conflict with #26021
Rebased f3d1658 -> f718aec (pr/bresult-load.8 -> pr/bresult-load.9, compare) due to conflict with #26005
Rebased f718aec -> 7bd578a (pr/bresult-load.9 -> pr/bresult-load.10, compare) due to conflicts with #25667, #26198, and #26282
Rebased 7bd578a -> 2c675f0 (pr/bresult-load.10 -> pr/bresult-load.11, compare) due to conflicts with #26238, #26462, #26594, #26618, #26758
Rebased 2c675f0 -> 2e12b25 (pr/bresult-load.11 -> pr/bresult-load.12, compare) on top of pr/bresult2.28
Rebased 2e12b25 -> 5c1be53 (pr/bresult-load.12 -> pr/bresult-load.13, compare) due to conflicts with #26595 and #26032
Rebased 5c1be53 -> 9c28172 (pr/bresult-load.13 -> pr/bresult-load.14, compare) due to conflicts with #25666 and #24845
Rebased 9c28172 -> 2a9db07 (pr/bresult-load.14 -> pr/bresult-load.15, compare) due to conflict with #27279

ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Jul 31, 2025
Suggested by Martin Leitner-Ankerl <martin.ankerl@gmail.com>
bitcoin#25722 (comment)

Co-authored-by: Martin Leitner-Ankerl <martin.ankerl@gmail.com>
The util::ResultPtr class is a wrapper for util::Result providing syntax sugar
to make it less awkward to use with returned pointers. Instead of needing to be
deferenced twice with **result or (*result)->member, it only needs to be
dereferenced once with *result or result->member. Also when it is used in a
boolean context, instead of evaluating to true when there is no error and the
pointer is null, it evaluates to false so it is straightforward to determine
whether the result points to something.

This PR is only partial a solution to bitcoin#26004 because while it makes it easier
to check for null pointer values, it does not make it impossible to return a
null pointer value inside a successful result. It would be possible to enforce
that successful results always contain non-null pointers by using a not_null
type (bitcoin#24423) in combination with
ResultPtr, though.
-BEGIN VERIFY SCRIPT-
git grep -l DatabaseStatus src | xargs sed -i s/DatabaseStatus/DatabaseError/g
sed -i '/^    SUCCESS,$/d' src/wallet/db.h
-END VERIFY SCRIPT-
@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 8, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants