MOVEONLY: Move wallet backup and encryption RPCs out of rpcwallet #23647

pull meshcollider wants to merge 4 commits into bitcoin:master from meshcollider:202111_split_walletrpc_total changing 6 files +390 −370
  1. meshcollider commented at 8:10 AM on December 2, 2021: contributor

    As part of an effort to split rpcwallet as per #23622, this moves rpcdump.cpp into the new wallet/rpc directory as well as moving backup and encryption RPCs out of rpcwallet.

  2. meshcollider added the label Refactoring on Dec 2, 2021
  3. meshcollider added the label Wallet on Dec 2, 2021
  4. meshcollider cross-referenced this on Dec 2, 2021 from issue [RFC] Splitting up rpcwallet by meshcollider
  5. DrahtBot commented at 12:01 PM on December 2, 2021: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #23497 (Add src/node/ and src/wallet/ code to node:: and wallet:: namespaces 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.

  6. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet: Replace confusing getAdjustedTime() with GetTime() by MarcoFalke
  7. meshcollider commented at 12:12 PM on December 2, 2021: contributor

    Too many conflicts, going to try just the first three commits.

  8. MarcoFalke commented at 12:42 PM on December 2, 2021: member

    No conflicts as of last run.

    :partying_face:

  9. MarcoFalke marked this as ready for review on Dec 2, 2021
  10. DrahtBot cross-referenced this on Dec 2, 2021 from issue [WIP] DRAFT NOMERGE Tidy up RPCTxSerializationFlags by MarcoFalke
  11. DrahtBot cross-referenced this on Dec 2, 2021 from issue scripted-diff: Use clang-tidy syntax for C++ named arguments by MarcoFalke
  12. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet, spkm: Move key management from DescriptorScriptPubKeyMan to wallet level KeyManager by achow101
  13. DrahtBot cross-referenced this on Dec 2, 2021 from issue Replace MakeSpan helper with Span deduction guide by sipa
  14. DrahtBot cross-referenced this on Dec 2, 2021 from issue Optimize coin selection by dropping BnB upper limit by S3RK
  15. DrahtBot cross-referenced this on Dec 2, 2021 from issue RPC: Better safety with newkeypool command and wallet backups by meshcollider
  16. in src/wallet/rpcwallet.h:20 in 0892bea014 outdated
      15 | +class CWallet;
      16 | +struct WalletContext;
      17 |  
      18 |  Span<const CRPCCommand> GetWalletRPCCommands();
      19 |  
      20 | +std::tuple<std::shared_ptr<CWallet>, std::vector<bilingual_str>> LoadWalletHelper(WalletContext& context, UniValue load_on_start_param, const std::string wallet_name);
    


    MarcoFalke commented at 2:50 PM on December 2, 2021:

    What would happen if this was moved to wallet/rpc/util?


    meshcollider commented at 7:13 PM on December 2, 2021:

    Yeah I was thinking about it but also conscious of @ryanofsky's idea to potentially split further into load.cpp and thought it would be better there. I can move it in a follow-up if preferred.

  17. in src/wallet/rpc/encrypt.cpp:6 in acc8d3286b outdated
       0 | @@ -0,0 +1,249 @@
       1 | +// Copyright (c) 2011-2021 The Bitcoin Core developers
       2 | +// Distributed under the MIT software license, see the accompanying
       3 | +// file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4 | +
       5 | +#include <rpc/util.h>
       6 | +#include <util/translation.h>
    


    MarcoFalke commented at 2:51 PM on December 2, 2021:

    why?

    diff --git a/src/wallet/rpc/encrypt.cpp b/src/wallet/rpc/encrypt.cpp
    index bd145624b7..e659f434a3 100644
    --- a/src/wallet/rpc/encrypt.cpp
    +++ b/src/wallet/rpc/encrypt.cpp
    @@ -3,7 +3,6 @@
     // file COPYING or http://www.opensource.org/licenses/mit-license.php.
     
     #include <rpc/util.h>
    -#include <util/translation.h>
     #include <wallet/rpc/util.h>
     #include <wallet/wallet.h>
     
    
  18. MarcoFalke approved
  19. MarcoFalke commented at 2:51 PM on December 2, 2021: member

    ACK acc8d3286b823c4c7117ed0a96955473e9531231 🌐

    <details><summary>Show signature</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK acc8d3286b823c4c7117ed0a96955473e9531231 🌐
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUjiZgv9GnY7+5aMLX9txfbszQ6ca/bHKp+JdJdyFIThs/nHExTJtj5pf7Vs4nAl
    zyVHJ88tGcryN3znQ9PXgH0SJkJoEKs8/lj5D6fCuUhZxpiWo3Pkwr1+m9/Fzmhp
    myyg0hfqHO/hKscHbqBymhnUBjLde+QxvvMubrGRcH7ttX2DXhf0CjkgOu1Cy66m
    OkwPa3gzsrRAmZgfccmQgakffQMCKvmbO7gZKLMp/ADq1xd7U1xMu3esU45aivLo
    /00J5R66WRU5yvSsu8q3Gbd+2cHSGCgJ1tqTdnfKu5LNFe0HHxzJZAb3+KZe+juv
    mWuMdK5K2ibQstTTJzvL7ufx7u4DCiQ17ZiBXnFKRzoHzfri/rbD2tpZ37pm53Et
    vimX1QJjuH3Q/EvkVo/mESFuX4WImUgZ824TI6LP5g+9ZzUy5xb1Ykjxu2CWaRmP
    NphiK+7GO14/vQ24fuzSA4tS2sO0Nubb4FGgh6bLCIHbQLzRd+/O2M6fj7YchfFT
    hDUbWhhl
    =GyxK
    -----END PGP SIGNATURE-----
    

    </details>

  20. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet: allow psbtbumpfee to work with txs with external inputs by achow101
  21. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet: Allow users to specify input weights when funding a transaction by achow101
  22. DrahtBot cross-referenced this on Dec 2, 2021 from issue Add warnings to createmultisig and addmultisig if using uncompressed keys by meshcollider
  23. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc: Fail to return undocumented or misdocumented JSON by MarcoFalke
  24. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc, wallet: Add listaddresses RPC by lsilva01
  25. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet: Automatically add receiving destinations to the address book by S3RK
  26. DrahtBot cross-referenced this on Dec 2, 2021 from issue RPC: Add universal options argument to listtransactions by kristapsk
  27. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc/wallet: add optional transaction(s) to getbalances by kallewoof
  28. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc: Add option to list transactions from oldest to newest in `listtransactions` RPC command by ben-kaufman
  29. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc/wallet: add simulaterawtransaction RPC by kallewoof
  30. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc: add getxpub by Sjors
  31. ryanofsky commented at 5:22 PM on December 2, 2021: contributor

    Code review ACK acc8d3286b823c4c7117ed0a96955473e9531231. Confirmed this is move-only (other than making RPC methods non-static)

  32. ryanofsky approved
  33. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet: allow toggling external_signer flag by Sjors
  34. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc, gui: bumpfee signer support by Sjors
  35. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet, refactor: return out-params of CreateTransaction() as optional struct by theStack
  36. meshcollider renamed this:
    Split rpcwallet into multiple smaller parts
    MOVEONLY: Move wallet backup and encryption RPCs out of rpcwallet
    on Dec 2, 2021
  37. DrahtBot cross-referenced this on Dec 2, 2021 from issue rpc: Add missing BlockUntilSyncedToCurrentChain to wallet RPCs by MarcoFalke
  38. DrahtBot added the label Needs rebase on Dec 2, 2021
  39. DrahtBot cross-referenced this on Dec 2, 2021 from issue wallet: Migrate legacy wallets to descriptor wallets by achow101
  40. MOVEONLY: Move rpcdump.cpp to wallet/rpc/backup.cpp 3a9d39324e
  41. MOVEONLY: Move backupwallet and restorewallet to rpc/backup.cpp 803b30502b
  42. MOVEONLY: Move wallet encryption RPCs to encrypt.cpp 8b73640152
  43. meshcollider commented at 11:40 PM on December 2, 2021: contributor

    Rebased and removed the unnecessary #include <util/translation.h>

    Also added a new commit moving LoadWalletHelper to util.

  44. DrahtBot removed the label Needs rebase on Dec 2, 2021
  45. DrahtBot cross-referenced this on Dec 3, 2021 from issue refactor: Extract RipeMd160 by Empact
  46. DrahtBot cross-referenced this on Dec 3, 2021 from issue [RPC] Include coinbase transactions in receivedby RPCs by andrewtoth
  47. MOVEONLY: Move LoadWalletHelper to wallet/rpc/util 5b2167fd30
  48. DrahtBot cross-referenced this on Dec 3, 2021 from issue Add `src/node/` and `src/wallet/` code to `node::` and `wallet::` namespaces by ryanofsky
  49. MarcoFalke approved
  50. MarcoFalke commented at 8:16 AM on December 3, 2021: member

    ACK 5b2167fd30ea4384b93a0226e9fbef4650aa9438 🎭

    <details><summary>Show signature</summary>

    Signature:

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512
    
    ACK 5b2167fd30ea4384b93a0226e9fbef4650aa9438 🎭
    -----BEGIN PGP SIGNATURE-----
    
    iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
    pUjWSAwAwn/XIKyHQa7CB5HTs5LLGzTptpL/Vw/TxqapygYFQvpyNrH+n08poK27
    hx0S9VROa7RQcR6V1g+qG6bpCFTPuXTVAH+hsfmB8wbgUXFrD2HRFGzvZKAMpd4v
    +kM0KG9Tk6s46rebOVeCqrm66HT9CAW5oU/+E1QBs6zhJwy/2pYqAkY/yeDyajmW
    wSNjxfKHyklREyX+EgZZubTmLdi8FbVr7mb76Fzg12T2kvx9Eo1SUymNcseZngbx
    O437ifxvr4g8mTAIeUocm1/o95AGU8PgV7UPXJRCbLbUBufzN6qfMk2/6VZrOb4l
    ucTX1XiPDPpu2dMoC1MNMjd2XxHaO7IIko0yX54wOl3BTZQDH915er0eA25sCIm3
    c+9J/CNmYHcVwwcXcOsn3t6SOPW5yZQOGAJHa16GBpfTBCun0exFpvFO9aTl9vJi
    XsruLAh/BdY7GbQg8yuoeztD36SzAKelU5ygJ/EMWzmo9BEaI94lTaCk42trJTq4
    gHsqzbHN
    =Y20I
    -----END PGP SIGNATURE-----
    

    </details>

  51. MarcoFalke referenced this in commit 8b4d53e4d6 on Dec 3, 2021
  52. DrahtBot added the label Needs rebase on Dec 3, 2021
  53. DrahtBot commented at 8:37 AM on December 3, 2021: contributor

    <!--cf906140f33d8803c4a75a2196329ecb-->

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

    <sub>Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a "draft".</sub>

  54. fanquake commented at 9:17 AM on December 3, 2021: member

    This was merged.

  55. fanquake closed this on Dec 3, 2021

  56. sidhujag referenced this in commit cb105948cc on Dec 3, 2021
  57. RandyMcMillan referenced this in commit ecc33dfa53 on Dec 23, 2021
  58. bitcoin locked this on Dec 3, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:53 UTC