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. DrahtBot commented at 12:01 PM on December 2, 2021: member

    <!--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.

  5. meshcollider commented at 12:12 PM on December 2, 2021: contributor

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

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

    No conflicts as of last run.

    :partying_face:

  7. MarcoFalke marked this as ready for review on Dec 2, 2021
  8. 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.

  9. 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>
     
    
  10. MarcoFalke approved
  11. 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>

  12. ryanofsky commented at 5:22 PM on December 2, 2021: member

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

  13. ryanofsky approved
  14. meshcollider renamed this:
    Split rpcwallet into multiple smaller parts
    MOVEONLY: Move wallet backup and encryption RPCs out of rpcwallet
    on Dec 2, 2021
  15. DrahtBot added the label Needs rebase on Dec 2, 2021
  16. MOVEONLY: Move rpcdump.cpp to wallet/rpc/backup.cpp 3a9d39324e
  17. MOVEONLY: Move backupwallet and restorewallet to rpc/backup.cpp 803b30502b
  18. MOVEONLY: Move wallet encryption RPCs to encrypt.cpp 8b73640152
  19. 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.

  20. DrahtBot removed the label Needs rebase on Dec 2, 2021
  21. MOVEONLY: Move LoadWalletHelper to wallet/rpc/util 5b2167fd30
  22. MarcoFalke approved
  23. 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>

  24. MarcoFalke referenced this in commit 8b4d53e4d6 on Dec 3, 2021
  25. DrahtBot added the label Needs rebase on Dec 3, 2021
  26. DrahtBot commented at 8:37 AM on December 3, 2021: member

    <!--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>

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

    This was merged.

  28. fanquake closed this on Dec 3, 2021

  29. sidhujag referenced this in commit cb105948cc on Dec 3, 2021
  30. RandyMcMillan referenced this in commit ecc33dfa53 on Dec 23, 2021
  31. DrahtBot 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-04-13 15:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me