Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[wallet] Clarify wallet initialization / destruction interface #10767
Conversation
jnewbery
added some commits
Jul 3, 2017
fanquake
added Wallet Refactoring
labels
Jul 7, 2017
This was referenced Jul 7, 2017
| @@ -187,11 +187,6 @@ void Shutdown() | ||
| StopREST(); | ||
| StopRPC(); | ||
| StopHTTPServer(); | ||
| -#ifdef ENABLE_WALLET |
jnewbery
Jul 7, 2017
Member
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.
| @@ -230,9 +225,7 @@ void Shutdown() | ||
| pblocktree = NULL; | ||
| } | ||
| #ifdef ENABLE_WALLET |
jnewbery
Jul 7, 2017
Member
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
changed the title from
Clarify wallet initialization / destruction interface to [wallet] Clarify wallet initialization / destruction interface
Jul 11, 2017
|
Rebase needed :-) |
|
This isn't going in until after 0.15. which includes some wallet changes. I'll rebase after 0.15 has been cut. |
|
@jnewbery Got it! Thanks for the clarification. |
jnewbery commentedJul 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 walletinit.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.
A few small changes in behavior. 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.Lots of commits to aid reviewers. Can be squashed down prior to merge.