Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wallet] Clarify wallet initialization / destruction interface #10767

Merged
merged 8 commits into from Sep 7, 2017

Conversation

jnewbery
Copy link
Contributor

@jnewbery jnewbery commented Jul 7, 2017

Apologies for the mostly code move only PR. This is a pre-req for both #10740 and #10762

All wallet component initialization/destruction functions are now in their own wallet/init.cpp translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

There should be no changes in behavior from this PR.

src/init.cpp Outdated
@@ -187,11 +187,6 @@ void Shutdown()
StopREST();
StopRPC();
StopHTTPServer();
#ifdef ENABLE_WALLET
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing replacing this code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct - I don't believe the early wallet flush is necessary (although I may be wrong). See PR description:

The most important one is that Flush() no longer gets called twice on shutdown. I think this is fine, and all the tests pass, but this probably requires some careful consideration from people who are more familiar with the wallet code.

src/init.cpp Outdated
@@ -230,9 +225,7 @@ void Shutdown()
pblocktree = NULL;
}
#ifdef ENABLE_WALLET
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about moving these #ifdef ENABLE_WALLET to walletinit.cpp?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because walletinit.cpp is in libbitcoin_wallet, so is not linked if ENABLE_WALLET isn't defined. #10762 will remove the libbitcoin_server -> libbitcoin_wallet dependencies entirely from init.cpp.

@jnewbery jnewbery changed the title Clarify wallet initialization / destruction interface [wallet] Clarify wallet initialization / destruction interface Jul 11, 2017
@practicalswift
Copy link
Contributor

Rebase needed :-)

@jnewbery
Copy link
Contributor Author

This isn't going in until after 0.15. which includes some wallet changes. I'll rebase after 0.15 has been cut.

@practicalswift
Copy link
Contributor

@jnewbery Got it! Thanks for the clarification.

@jnewbery
Copy link
Contributor Author

This overlaps significantly with #10976, which is easier to review since it's mostly move-only.

I'll rebase this on #10976 once that gets merged.

@jnewbery
Copy link
Contributor Author

Rebased on @ryanofsky's #10976 and reduced scope. This PR now only moves the remaining wallet startup/shutdown functions to wallet/init.cpp in preparation for #10740 (dynamic loading/unloading of wallets) and #10762 (remove wallet dependencies from init.cpp).

There should be no change in behavior from this PR.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 3f425ee4263f66ab039c089d189b6cad0abbc23c. Looks like a simple cleanup with no change in behavior. FWIW I have similar functions in #10973, but am using {start, stop, shutdown} instead of {WalletCompleteStartup, FlushWallets, ShutdownWallets}. Links: declarations, definitions

@@ -22,4 +22,7 @@ bool WalletVerify();
//! Load wallet databases.
bool InitLoadWallet();

//! Flush all wallets in preparation for shutdown.
// Call with shutdown = true to actually shutdown the wallet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "[wallet] move wallet flush calls to wallet/init.cpp"

I think you need to use //! prefix on each line of the comment for doxygen to pick it up.

src/init.cpp Outdated
delete pwallet;
}
vpwallets.clear();
DetachWallets();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In commit "[wallet] move wallet detach calls to wallet/init.cpp"

Maybe go with "close" or "free" instead of "detach". Detach sounds like it could be keeping the wallets open but handing them off.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 FreeWallets.

@@ -6,14 +6,22 @@
#ifndef BITCOIN_WALLET_INIT_H
#define BITCOIN_WALLET_INIT_H

#include "wallet/rpcwallet.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

@@ -245,3 +253,28 @@ bool InitLoadWallet()

return true;
}

void WalletCompleteStartup(CScheduler& scheduler) {
for (CWalletRef pwallet : vpwallets) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Offtopic, we could ditch CWalletRef.

src/init.cpp Outdated
delete pwallet;
}
vpwallets.clear();
DetachWallets();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 FreeWallets.

void ShutdownWallets();

//! Detach all wallets
void DetachWallets();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newline after.

//! Shutdown all wallets. Wallets will be flushed first.
void ShutdownWallets();

//! Detach all wallets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@@ -22,4 +30,15 @@ bool WalletVerify();
//! Load wallet databases.
bool InitLoadWallet();

//! Complete startup of wallets
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

//! Return the wallets help message.
std::string GetWalletHelpString(bool showDebug);

//! Wallets parameter interaction
bool WalletParameterInteraction();

//! Register wallet RPCs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing period?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix above too.

@jnewbery
Copy link
Contributor Author

Re: naming of unload/close/free/detach wallet function. I want the wallet loading/unloading RPC verbs to be antonyms so it's obvious they're carrying out opposite actions. I started with load/unload, but dropped that to avoid any ambiguity with adding keys and addresses to an already open wallet. attach/detach is bad for the reason Russ mentioned. Is everyone happy with open/close?

(I guess the name of the function doesn't need to map exactly to the name of the RPC, but I think it makes sense to do that if we can)

@ryanofsky
Copy link
Contributor

open/close or load/unload is what I would call it

@jnewbery
Copy link
Contributor Author

I've addressed the comments and changed names a little. @ryanofsky do you mind taking a look?

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ca94bf2c39b06f1ed643c24dfcd78ef5af00562a. Note that what you're calling flush, I'm calling stop in #10973, and what you're calling stop, I'm calling shutdown. But I'm not too worried about the names.

#10973 links: declarations, definitions

@ryanofsky
Copy link
Contributor

Also just a suggestion, but this might be easier to review if it were just 2 commits, one commit for RPC stuff and one commit for the start/stop/flush stuff, so you could see the related parts together.

@jnewbery
Copy link
Contributor Author

Thanks @ryanofsky .

Other reviewers/maintainers - I'm happy to rebase/squash as Russ suggests if that makes things easier to review. Please let me know if you want that.

@meshcollider
Copy link
Contributor

utACK ca94bf2

Copy link
Contributor

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ca94bf2c39b06f1ed643c24dfcd78ef5af00562a. I'm willing to bet this materially reduces the memory usage/compile time of init.cpp due to the wallet.h import removal.

@@ -44,7 +44,6 @@
#include "validationinterface.h"
#ifdef ENABLE_WALLET
#include "wallet/init.h"
#include "wallet/wallet.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Holy fuck yes, kill the imports.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK. Is mostly move-only

@@ -1567,7 +1559,7 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)

// ********************************************************* Step 8: load wallet
#ifdef ENABLE_WALLET
if (!InitLoadWallet())
if (!OpenWallets())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the rationale for rename in the commit message? Why not keep it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnewbery Or add it to the OP, so it can be seen in the merge commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

//! Return the wallets help message.
std::string GetWalletHelpString(bool showDebug);

//! Wallets parameter interaction
bool WalletParameterInteraction();

//! Register wallet RPCs.
void RegisterWalletRPC(CRPCTable &tableRPC);

//! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
// This function will perform salvage on the wallet if requested, as long as only one wallet is
// being loaded (CWallet::ParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should say "WalletParameterInteraction"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added as trivial commit

@laanwj laanwj self-assigned this Sep 7, 2017
Rationale:
- this init function can now open multiple wallets (hence
  Wallet->Wallets)
- This is named as the antonym to CloseWallets(), which carries out the
  opposite action.
This function can now verify multiple wallets.
@jnewbery
Copy link
Contributor Author

jnewbery commented Sep 7, 2017

@MarcoFalke - nits addressed. Should be ready for merge if Travis agrees.

@maflcko
Copy link
Member

maflcko commented Sep 7, 2017

re-utACK commit-by-commit 5d2a399

@maflcko maflcko merged commit 5d2a399 into bitcoin:master Sep 7, 2017
maflcko pushed a commit that referenced this pull request Sep 7, 2017
…terface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both #10740 and #10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
@jnewbery jnewbery deleted the walletinit2 branch September 10, 2017 18:51
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 22, 2019
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 4, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 4, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 10, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 10, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 10, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 12, 2020
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Jun 30, 2021
…tion interface

5d2a399 [trivial] fixup comment for VerifyWallets() (John Newbery)
43b0e81 [wallet] Add StartWallets() function to wallet/init.cpp (John Newbery)
290f3c5 [wallet] Add RegisterWalletRPC() function to wallet/init.cpp (John Newbery)
062d631 [wallet] Add CloseWallets() function to wallet/init.cpp (John Newbery)
77fe07c [wallet] Add StopWallets() function to wallet/init.cpp (John Newbery)
2da5eaf [wallet] Add FlushWallets() function to wallet/init.cpp (John Newbery)
1b9cee6 [wallet] Rename WalletVerify() to VerifyWallets() (John Newbery)
9c76ba1 [wallet] Rename InitLoadWallet() to OpenWallets() (John Newbery)

Pull request description:

  Apologies for the mostly code move only PR. This is a pre-req for both bitcoin#10740 and bitcoin#10762

  All wallet component initialization/destruction functions are now in their own `wallet/init.cpp` translation unit and are no longer static functions on the CWallet class. The bitcoin_server also no longer has any knowledge that there are multiple wallets in vpwallet.

  There should be no changes in behavior from this PR.

Tree-SHA512: 7c260eb094f2fa1a88d803769ba60935810968a7309f731135e4b17623b97f18c03bbcd293c942093d1efce62c6c978f9ff484d54dc9a60bc2fcb5af2d160fcd
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants