aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Dobson <dobsonsa68@gmail.com>2021-12-01 16:52:29 +1300
committerSamuel Dobson <dobsonsa68@gmail.com>2021-12-08 11:45:21 +1300
commitd794d0da8f05c66e4a81615c6de8c50f8bcdb5be (patch)
tree3ac877944e7f59af34984d6e3c0a4f382b29dfe8
parente116b9747d083bf269f1e1c67295b57d700d9dbd (diff)
downloadbitcoin-d794d0da8f05c66e4a81615c6de8c50f8bcdb5be.tar.xz
Remove unused imports from rpc/wallet and reorder RPCs
-rw-r--r--src/wallet/rpc/wallet.cpp53
-rw-r--r--src/wallet/rpc/wallet.h2
2 files changed, 20 insertions, 35 deletions
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp
index b0b586c41c..a4f300019e 100644
--- a/src/wallet/rpc/wallet.cpp
+++ b/src/wallet/rpc/wallet.cpp
@@ -3,38 +3,20 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include <consensus/amount.h>
#include <core_io.h>
-#include <interfaces/chain.h>
#include <key_io.h>
-#include <node/context.h>
-#include <outputtype.h>
-#include <policy/feerate.h>
-#include <policy/fees.h>
-#include <policy/rbf.h>
#include <rpc/server.h>
#include <rpc/util.h>
-#include <script/descriptor.h>
-#include <script/sign.h>
-#include <util/string.h>
-#include <util/system.h>
#include <util/translation.h>
-#include <wallet/coincontrol.h>
-#include <wallet/load.h>
#include <wallet/receive.h>
#include <wallet/rpc/wallet.h>
#include <wallet/rpc/util.h>
#include <wallet/wallet.h>
-#include <wallet/walletdb.h>
-#include <wallet/walletutil.h>
#include <optional>
-#include <stdint.h>
#include <univalue.h>
-#include <map>
-
/** Checks if a CKey is in the given CWallet compressed or otherwise*/
bool HaveKey(const SigningProvider& wallet, const CKey& key)
@@ -592,6 +574,22 @@ static RPCHelpMan upgradewallet()
};
}
+// addresses
+RPCHelpMan getaddressinfo();
+RPCHelpMan getnewaddress();
+RPCHelpMan getrawchangeaddress();
+RPCHelpMan setlabel();
+RPCHelpMan listaddressgroupings();
+RPCHelpMan addmultisigaddress();
+RPCHelpMan keypoolrefill();
+RPCHelpMan newkeypool();
+RPCHelpMan getaddressesbylabel();
+RPCHelpMan listlabels();
+#ifdef ENABLE_EXTERNAL_SIGNER
+RPCHelpMan walletdisplayaddress();
+#endif // ENABLE_EXTERNAL_SIGNER
+
+// backup
RPCHelpMan abortrescan();
RPCHelpMan dumpprivkey();
RPCHelpMan importprivkey();
@@ -604,24 +602,9 @@ RPCHelpMan removeprunedfunds();
RPCHelpMan importmulti();
RPCHelpMan importdescriptors();
RPCHelpMan listdescriptors();
-RPCHelpMan signmessage();
RPCHelpMan backupwallet();
RPCHelpMan restorewallet();
-// addresses
-RPCHelpMan getnewaddress();
-RPCHelpMan getrawchangeaddress();
-RPCHelpMan setlabel();
-RPCHelpMan listaddressgroupings();
-RPCHelpMan addmultisigaddress();
-RPCHelpMan keypoolrefill();
-RPCHelpMan newkeypool();
-RPCHelpMan getaddressesbylabel();
-RPCHelpMan listlabels();
-#ifdef ENABLE_EXTERNAL_SIGNER
-RPCHelpMan walletdisplayaddress();
-#endif // ENABLE_EXTERNAL_SIGNER
-
// coins
RPCHelpMan getreceivedbyaddress();
RPCHelpMan getreceivedbylabel();
@@ -648,6 +631,10 @@ RPCHelpMan psbtbumpfee();
RPCHelpMan send();
RPCHelpMan walletprocesspsbt();
RPCHelpMan walletcreatefundedpsbt();
+RPCHelpMan signrawtransactionwithwallet();
+
+// signmessage
+RPCHelpMan signmessage();
// transactions
RPCHelpMan listreceivedbyaddress();
diff --git a/src/wallet/rpc/wallet.h b/src/wallet/rpc/wallet.h
index 59abe90d55..cdc9a8cc92 100644
--- a/src/wallet/rpc/wallet.h
+++ b/src/wallet/rpc/wallet.h
@@ -11,6 +11,4 @@ class CRPCCommand;
Span<const CRPCCommand> GetWalletRPCCommands();
-RPCHelpMan getaddressinfo();
-RPCHelpMan signrawtransactionwithwallet();
#endif // BITCOIN_WALLET_RPC_WALLET_H