Files
bitcoin/src/wallet
merge-script 4757b71aa7 Merge bitcoin/bitcoin#34938: refactor: Return std::optional over bool+mut&
fabab69e9e refactor: Return std::optional from ParseDouble (MarcoFalke)
fa0a09441d refactor: Return std::optional from GetWalletNameFromJSONRPCRequest (MarcoFalke)
fafb0c4cbe refactor: Return std::optional from GetLogCategory (MarcoFalke)

Pull request description:

  Using a bool to indicate whether a mutable in-out param was written to is fine in legacy code, but otherwise confusing and brittle:

  * Sometimes the in-out-param is written to, even when the function returns `false`, like in `ParseDouble`.
  * Call sites must manually check the return value

  Fix those issues by returning `std::optional<_>` from `ParseDouble` (and a few other functions).

  This refactor is a style cleanup and does not change any behavior.

ACKs for top commit:
  stickies-v:
    re-ACK fabab69e9e
  hodlinator:
    crACK fabab69e9e
  rkrux:
    code review ACK fabab69e9e

Tree-SHA512: e27a27174e9d2200da8b0ca9b6cc056e94d2b25e6332975f1ad660ee85b02680a65ac93b2ed29f10da0ae5f6dc8395bddc9e973a3f925c68a0c8116c9282ea09
2026-03-31 23:42:49 +08:00
..