Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
[WIP] [wallet] Remove Wallet dependencies from init.cpp #10762
Conversation
fanquake
added Refactoring Wallet
labels
Jul 7, 2017
jnewbery
added some commits
Jul 3, 2017
jnewbery
referenced
this pull request
Jul 7, 2017
Open
[WIP] [wallet] dynamic loading/unloading of wallets #10740
|
Will take a look. |
|
Thanks @promag - this is very rough-and-ready at the moment. It builds and passes tests, but is not ready for code review. I'd be very happy to get feedback about general concept though. |
Yeah I was just about to make this suggestion. You could delete the Also you should prefix global variables with |
Thanks @ryanofsky, you've convinced me - I'll split this PR into two. But I think I'll do it the other way round - first move the wallet initialization/destruction functions into their own |
jnewbery commentedJul 7, 2017
•
edited
Work in progress. This will eventually build off #10767, but is now yet ready for review. Currently looking for feedback on concept and approach.
This continues the work of #7965. This PR, along with #10583, #10579, #10571, #8843 and one more PR to split
createmultisig, would remove the remaining dependencies from libbitcoin_server.a on libbitcoin_wallet.a.I've used the same
boost::signalapproach that is used in the validationinterface. bitcoind.cpp and qt/bitcoin.cpp register wallet initialization/destruction callbacks as slots in aWalletInitInterface, and init.cpp emits those signals during startup/shutdown. This could potentially be extended in future to allow multiple wallets or other modules to register.To create the interface, I've just translated all the old init.cpp wallet function calls into signals. I've not done any thinking about whether it makes sense to change that interface by combining/splitting those calls. This is a purely internal interface, so there's no problem in changing it later.