Skip to content

Commit bf18e7a

Browse files
committed
Remove unused imports from rpc/wallet and reorder RPCs
1 parent d17884f commit bf18e7a

File tree

3 files changed

+20
-35
lines changed

3 files changed

+20
-35
lines changed

src/rpc/evo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@
3535

3636
#ifdef ENABLE_WALLET
3737
#include <wallet/coincontrol.h>
38-
#include <wallet/rpcwallet.h>
3938
#include <wallet/spend.h>
4039
#include <wallet/wallet.h>
4140
#endif//ENABLE_WALLET
4241

4342
#ifdef ENABLE_WALLET
44-
extern RPCHelpMan signrawtransaction();
43+
extern RPCHelpMan signrawtransactionwithwallet();
4544
extern RPCHelpMan sendrawtransaction();
4645
#else
4746
class CWallet;

src/wallet/rpc/wallet.cpp

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,49 +5,35 @@
55
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
66

77
#include <chainparams.h>
8-
#include <consensus/amount.h>
98
#include <core_io.h>
109
#include <httpserver.h>
11-
#include <interfaces/chain.h>
12-
#include <node/context.h>
13-
#include <policy/feerate.h>
14-
#include <policy/fees.h>
1510
#include <policy/policy.h>
1611
#include <rpc/blockchain.h>
1712
#include <rpc/rawtransaction_util.h>
1813
#include <rpc/server.h>
1914
#include <rpc/util.h>
20-
#include <script/descriptor.h>
2115
#include <util/bip32.h>
2216
#include <util/fees.h>
23-
#include <util/string.h>
24-
#include <util/system.h>
2517
#include <util/translation.h>
2618
#include <util/url.h>
2719
#include <util/vector.h>
28-
#include <wallet/coincontrol.h>
2920
#include <wallet/context.h>
30-
#include <wallet/load.h>
3121
#include <wallet/receive.h>
3222
#include <wallet/rpc/wallet.h>
3323
#include <wallet/rpc/util.h>
3424
#include <wallet/scriptpubkeyman.h>
3525
#include <wallet/spend.h>
3626
#include <wallet/wallet.h>
37-
#include <wallet/walletdb.h>
38-
#include <wallet/walletutil.h>
3927
#include <key_io.h>
4028

4129
#include <coinjoin/client.h>
4230
#include <coinjoin/options.h>
4331
#include <llmq/chainlocks.h>
4432

45-
#include <stdint.h>
33+
#include <optional>
4634

4735
#include <univalue.h>
4836

49-
#include <optional>
50-
5137
/** Checks if a CKey is in the given CWallet compressed or otherwise*/
5238
bool HaveKey(const SigningProvider& wallet, const CKey& key)
5339
{
@@ -920,7 +906,19 @@ static RPCHelpMan upgradewallet()
920906
};
921907
}
922908

923-
RPCHelpMan abortrescan();
909+
// addresses
910+
RPCHelpMan getaddressinfo();
911+
RPCHelpMan getnewaddress();
912+
RPCHelpMan getrawchangeaddress();
913+
RPCHelpMan setlabel();
914+
RPCHelpMan listaddressgroupings();
915+
RPCHelpMan addmultisigaddress();
916+
RPCHelpMan keypoolrefill();
917+
RPCHelpMan newkeypool();
918+
RPCHelpMan getaddressesbylabel();
919+
RPCHelpMan listlabels();
920+
921+
// backup
924922
RPCHelpMan dumpprivkey();
925923
RPCHelpMan importprivkey();
926924
RPCHelpMan importaddress();
@@ -932,23 +930,11 @@ RPCHelpMan removeprunedfunds();
932930
RPCHelpMan importmulti();
933931
RPCHelpMan importdescriptors();
934932
RPCHelpMan listdescriptors();
935-
RPCHelpMan signmessage();
936933
RPCHelpMan backupwallet();
937934
RPCHelpMan restorewallet();
938935
RPCHelpMan dumphdinfo();
939936
RPCHelpMan importelectrumwallet();
940937

941-
// addresses
942-
RPCHelpMan getnewaddress();
943-
RPCHelpMan getrawchangeaddress();
944-
RPCHelpMan setlabel();
945-
RPCHelpMan listaddressgroupings();
946-
RPCHelpMan addmultisigaddress();
947-
RPCHelpMan keypoolrefill();
948-
RPCHelpMan newkeypool();
949-
RPCHelpMan getaddressesbylabel();
950-
RPCHelpMan listlabels();
951-
952938
// coins
953939
RPCHelpMan getreceivedbyaddress();
954940
RPCHelpMan getreceivedbylabel();
@@ -973,6 +959,10 @@ RPCHelpMan fundrawtransaction();
973959
RPCHelpMan send();
974960
RPCHelpMan walletprocesspsbt();
975961
RPCHelpMan walletcreatefundedpsbt();
962+
RPCHelpMan signrawtransactionwithwallet();
963+
964+
// signmessage
965+
RPCHelpMan signmessage();
976966

977967
// transactions
978968
RPCHelpMan listreceivedbyaddress();
@@ -982,6 +972,7 @@ RPCHelpMan listsinceblock();
982972
RPCHelpMan gettransaction();
983973
RPCHelpMan abandontransaction();
984974
RPCHelpMan rescanblockchain();
975+
RPCHelpMan abortrescan();
985976

986977
Span<const CRPCCommand> GetWalletRPCCommands()
987978
{

src/wallet/rpc/wallet.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,4 @@ class CRPCCommand;
1111

1212
Span<const CRPCCommand> GetWalletRPCCommands();
1313

14-
RPCHelpMan getaddressinfo();
15-
RPCHelpMan getrawchangeaddress();
16-
RPCHelpMan addmultisigaddress();
17-
RPCHelpMan signrawtransactionwithwallet();
18-
1914
#endif // BITCOIN_WALLET_RPC_WALLET_H

0 commit comments

Comments
 (0)