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

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

    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?

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

    ACK acc8d3286b823c4c7117ed0a96955473e9531231 🌐

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3ACK acc8d3286b823c4c7117ed0a96955473e9531231 🌐
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUjiZgv9GnY7+5aMLX9txfbszQ6ca/bHKp+JdJdyFIThs/nHExTJtj5pf7Vs4nAl
     8zyVHJ88tGcryN3znQ9PXgH0SJkJoEKs8/lj5D6fCuUhZxpiWo3Pkwr1+m9/Fzmhp
     9myyg0hfqHO/hKscHbqBymhnUBjLde+QxvvMubrGRcH7ttX2DXhf0CjkgOu1Cy66m
    10OkwPa3gzsrRAmZgfccmQgakffQMCKvmbO7gZKLMp/ADq1xd7U1xMu3esU45aivLo
    11/00J5R66WRU5yvSsu8q3Gbd+2cHSGCgJ1tqTdnfKu5LNFe0HHxzJZAb3+KZe+juv
    12mWuMdK5K2ibQstTTJzvL7ufx7u4DCiQ17ZiBXnFKRzoHzfri/rbD2tpZ37pm53Et
    13vimX1QJjuH3Q/EvkVo/mESFuX4WImUgZ824TI6LP5g+9ZzUy5xb1Ykjxu2CWaRmP
    14NphiK+7GO14/vQ24fuzSA4tS2sO0Nubb4FGgh6bLCIHbQLzRd+/O2M6fj7YchfFT
    15hDUbWhhl
    16=GyxK
    17-----END PGP SIGNATURE-----
    
  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 🎭

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3ACK 5b2167fd30ea4384b93a0226e9fbef4650aa9438 🎭
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUjWSAwAwn/XIKyHQa7CB5HTs5LLGzTptpL/Vw/TxqapygYFQvpyNrH+n08poK27
     8hx0S9VROa7RQcR6V1g+qG6bpCFTPuXTVAH+hsfmB8wbgUXFrD2HRFGzvZKAMpd4v
     9+kM0KG9Tk6s46rebOVeCqrm66HT9CAW5oU/+E1QBs6zhJwy/2pYqAkY/yeDyajmW
    10wSNjxfKHyklREyX+EgZZubTmLdi8FbVr7mb76Fzg12T2kvx9Eo1SUymNcseZngbx
    11O437ifxvr4g8mTAIeUocm1/o95AGU8PgV7UPXJRCbLbUBufzN6qfMk2/6VZrOb4l
    12ucTX1XiPDPpu2dMoC1MNMjd2XxHaO7IIko0yX54wOl3BTZQDH915er0eA25sCIm3
    13c+9J/CNmYHcVwwcXcOsn3t6SOPW5yZQOGAJHa16GBpfTBCun0exFpvFO9aTl9vJi
    14XsruLAh/BdY7GbQg8yuoeztD36SzAKelU5ygJ/EMWzmo9BEaI94lTaCk42trJTq4
    15gHsqzbHN
    16=Y20I
    17-----END PGP SIGNATURE-----
    
  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

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

    Want to unsubscribe from rebase notifications on this pull request? Just convert this pull request to a “draft”.

  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: 2024-11-17 15:12 UTC

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