@@ -18,39 +18,39 @@ class WalletInit : public WalletInitInterface {
18
18
public:
19
19
20
20
// ! Return the wallets help message.
21
- std::string GetHelpString (bool showDebug) override ;
21
+ std::string GetHelpString (bool showDebug) const override ;
22
22
23
23
// ! Wallets parameter interaction
24
- bool ParameterInteraction () override ;
24
+ bool ParameterInteraction () const override ;
25
25
26
26
// ! Register wallet RPCs.
27
- void RegisterRPC (CRPCTable &tableRPC) override ;
27
+ void RegisterRPC (CRPCTable &tableRPC) const override ;
28
28
29
29
// ! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
30
30
// This function will perform salvage on the wallet if requested, as long as only one wallet is
31
31
// being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
32
- bool Verify () override ;
32
+ bool Verify () const override ;
33
33
34
34
// ! Load wallet databases.
35
- bool Open () override ;
35
+ bool Open () const override ;
36
36
37
37
// ! Complete startup of wallets.
38
- void Start (CScheduler& scheduler) override ;
38
+ void Start (CScheduler& scheduler) const override ;
39
39
40
40
// ! Flush all wallets in preparation for shutdown.
41
- void Flush () override ;
41
+ void Flush () const override ;
42
42
43
43
// ! Stop all wallets. Wallets will be flushed first.
44
- void Stop () override ;
44
+ void Stop () const override ;
45
45
46
46
// ! Close all wallets.
47
- void Close () override ;
47
+ void Close () const override ;
48
48
};
49
49
50
50
static WalletInit g_wallet_init;
51
51
WalletInitInterface* const g_wallet_init_interface = &g_wallet_init;
52
52
53
- std::string WalletInit::GetHelpString (bool showDebug)
53
+ std::string WalletInit::GetHelpString (bool showDebug) const
54
54
{
55
55
std::string strUsage = HelpMessageGroup (_ (" Wallet options:" ));
56
56
strUsage += HelpMessageOpt (" -addresstype" , strprintf (" What type of addresses to use (\" legacy\" , \" p2sh-segwit\" , or \" bech32\" , default: \" %s\" )" , FormatOutputType (DEFAULT_ADDRESS_TYPE)));
@@ -92,7 +92,7 @@ std::string WalletInit::GetHelpString(bool showDebug)
92
92
return strUsage;
93
93
}
94
94
95
- bool WalletInit::ParameterInteraction ()
95
+ bool WalletInit::ParameterInteraction () const
96
96
{
97
97
if (gArgs .GetBoolArg (" -disablewallet" , DEFAULT_DISABLE_WALLET)) {
98
98
for (const std::string& wallet : gArgs .GetArgs (" -wallet" )) {
@@ -220,7 +220,7 @@ bool WalletInit::ParameterInteraction()
220
220
return true ;
221
221
}
222
222
223
- void WalletInit::RegisterRPC (CRPCTable &t)
223
+ void WalletInit::RegisterRPC (CRPCTable &t) const
224
224
{
225
225
if (gArgs .GetBoolArg (" -disablewallet" , DEFAULT_DISABLE_WALLET)) {
226
226
return ;
@@ -229,7 +229,7 @@ void WalletInit::RegisterRPC(CRPCTable &t)
229
229
RegisterWalletRPCCommands (t);
230
230
}
231
231
232
- bool WalletInit::Verify ()
232
+ bool WalletInit::Verify () const
233
233
{
234
234
if (gArgs .GetBoolArg (" -disablewallet" , DEFAULT_DISABLE_WALLET)) {
235
235
return true ;
@@ -304,7 +304,7 @@ bool WalletInit::Verify()
304
304
return true ;
305
305
}
306
306
307
- bool WalletInit::Open ()
307
+ bool WalletInit::Open () const
308
308
{
309
309
if (gArgs .GetBoolArg (" -disablewallet" , DEFAULT_DISABLE_WALLET)) {
310
310
LogPrintf (" Wallet disabled!\n " );
@@ -322,28 +322,28 @@ bool WalletInit::Open()
322
322
return true ;
323
323
}
324
324
325
- void WalletInit::Start (CScheduler& scheduler)
325
+ void WalletInit::Start (CScheduler& scheduler) const
326
326
{
327
327
for (CWalletRef pwallet : vpwallets) {
328
328
pwallet->postInitProcess (scheduler);
329
329
}
330
330
}
331
331
332
- void WalletInit::Flush ()
332
+ void WalletInit::Flush () const
333
333
{
334
334
for (CWalletRef pwallet : vpwallets) {
335
335
pwallet->Flush (false );
336
336
}
337
337
}
338
338
339
- void WalletInit::Stop ()
339
+ void WalletInit::Stop () const
340
340
{
341
341
for (CWalletRef pwallet : vpwallets) {
342
342
pwallet->Flush (true );
343
343
}
344
344
}
345
345
346
- void WalletInit::Close ()
346
+ void WalletInit::Close () const
347
347
{
348
348
for (CWalletRef pwallet : vpwallets) {
349
349
delete pwallet;
0 commit comments