File tree Expand file tree Collapse file tree 10 files changed +41
-26
lines changed Expand file tree Collapse file tree 10 files changed +41
-26
lines changed Original file line number Diff line number Diff line change 16
16
#include " utilstrencodings.h"
17
17
#include " validation.h"
18
18
#include " version.h"
19
+ #include " wallet/wallet.h"
19
20
20
21
#include < boost/algorithm/string.hpp>
21
22
Original file line number Diff line number Diff line change 15
15
#include " messagesigner.h"
16
16
#include " rpc/server.h"
17
17
#include " utilmoneystr.h"
18
+ #ifdef ENABLE_WALLET
19
+ #include " wallet/rpcwallet.h"
20
+ #endif
18
21
19
22
#include < univalue.h>
20
23
Original file line number Diff line number Diff line change 14
14
#include " netbase.h"
15
15
#include " rpc/server.h"
16
16
#include " utilmoneystr.h"
17
+ #ifdef ENABLE_WALLET
18
+ #include " wallet/rpcwallet.h"
19
+ #endif
17
20
18
21
#include < univalue.h>
19
22
Original file line number Diff line number Diff line change 17
17
#include " rpc/server.h"
18
18
#include " validationinterface.h"
19
19
#ifdef ENABLE_WALLET
20
+ #include " wallet/rpcwallet.h"
20
21
#include " wallet/db.h"
21
22
#include " wallet/wallet.h"
22
23
#endif
Original file line number Diff line number Diff line change 18
18
#include " timedata.h"
19
19
#include " util/system.h"
20
20
#ifdef ENABLE_WALLET
21
+ #include " wallet/rpcwallet.h"
21
22
#include " wallet/wallet.h"
22
23
#include " wallet/walletdb.h"
23
24
#endif
Original file line number Diff line number Diff line change 25
25
#ifdef ENABLE_WALLET
26
26
#include " sapling/address.h"
27
27
#include " sapling/key_io_sapling.h"
28
+ #include " wallet/rpcwallet.h"
28
29
#include " wallet/wallet.h"
29
30
#endif
30
31
Original file line number Diff line number Diff line change @@ -196,17 +196,6 @@ extern double GetDifficulty(const CBlockIndex* blockindex = NULL);
196
196
extern std::string HelpExampleCli (std::string methodname, std::string args);
197
197
extern std::string HelpExampleRpc (std::string methodname, std::string args);
198
198
199
- // Needed even with !ENABLE_WALLET, to pass (ignored) pointers around
200
- class CWallet ;
201
- CWallet* GetWalletForJSONRPCRequest (const JSONRPCRequest& request);
202
-
203
- #ifdef ENABLE_WALLET
204
- // New code should accessing the wallet should be under the ../wallet/ directory
205
- std::string HelpRequiringPassphrase (CWallet* const pwallet);
206
- bool EnsureWalletIsAvailable (CWallet* const pwallet, bool avoidException);
207
- void EnsureWalletIsUnlocked (CWallet *pwallet, bool fAllowAnonOnly = false );
208
- #endif
209
-
210
199
bool StartRPC ();
211
200
void InterruptRPC ();
212
201
void StopRPC ();
Original file line number Diff line number Diff line change 15
15
#include " util/system.h"
16
16
#include " utilstrencodings.h"
17
17
#include " utiltime.h"
18
- #include " wallet/wallet.h"
18
+ #include " wallet/rpcwallet.h"
19
+ #include " wallet.h"
20
+ #include " validation.h"
19
21
20
22
#include < fstream>
21
23
#include < secp256k1.h>
Original file line number Diff line number Diff line change 5
5
// Distributed under the MIT software license, see the accompanying
6
6
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
7
7
8
+ #include " wallet/rpcwallet.h"
9
+
8
10
#include " addressbook.h"
9
11
#include " amount.h"
10
12
#include " base58.h"
17
19
#include " net.h"
18
20
#include " policy/feerate.h"
19
21
#include " rpc/server.h"
20
- #include " timedata.h"
21
- #include " util/system.h"
22
- #include " utilmoneystr.h"
23
- #include " wallet.h"
24
- #include " walletdb.h"
25
- #include " zpivchain.h"
26
-
27
22
#include " sapling/sapling_operation.h"
28
23
#include " sapling/transaction_builder.h"
29
24
#include " sapling/key_io_sapling.h"
30
-
31
- #include < stdint.h>
32
-
33
25
#include " spork.h"
26
+ #include " timedata.h"
27
+ #include " utilmoneystr.h"
28
+ #include " wallet/wallet.h"
29
+ #include " wallet/walletdb.h"
30
+ #include " zpivchain.h"
34
31
32
+ #include < stdint.h>
35
33
#include < univalue.h>
36
34
37
35
Original file line number Diff line number Diff line change 1
- // Copyright (c) 2016 The Bitcoin Core developers
1
+ // Copyright (c) 2016-2021 The Bitcoin Core developers
2
+ // Copyright (c) 2021 The PIVX developers
2
3
// Distributed under the MIT software license, see the accompanying
3
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+ #ifndef PIVX_WALLET_RPCWALLET_H
6
+ #define PIVX_WALLET_RPCWALLET_H
4
7
5
- #ifndef BITCOIN_WALLET_RPCWALLET_H
6
- #define BITCOIN_WALLET_RPCWALLET_H
8
+ #include < string>
7
9
8
10
class CRPCTable ;
11
+ class CWallet ;
12
+ class JSONRPCRequest ;
9
13
10
14
void RegisterWalletRPCCommands (CRPCTable &tableRPC);
11
15
12
- #endif // BITCOIN_WALLET_RPCWALLET_H
16
+ /* *
17
+ * Figures out what wallet, if any, to use for a JSONRPCRequest.
18
+ *
19
+ * @param[in] request JSONRPCRequest that wishes to access a wallet
20
+ * @return NULL if no wallet should be used, or a pointer to the CWallet
21
+ */
22
+ CWallet* GetWalletForJSONRPCRequest (const JSONRPCRequest& request);
23
+
24
+ std::string HelpRequiringPassphrase (CWallet* const pwallet);
25
+ bool EnsureWalletIsAvailable (CWallet* const pwallet, bool avoidException);
26
+ void EnsureWalletIsUnlocked (CWallet* const pwallet, bool fAllowAnonOnly = false );
27
+
28
+ #endif // PIVX_WALLET_RPCWALLET_H
You can’t perform that action at this time.
0 commit comments