-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Closed
Labels
Milestone
Description
We've been quite successful in eliminating these lately (#7905, #7691).
It would be nice to disentangle the wallet and non-wallet initialization completely so that init.cpp no longer depends on the wallet (and thus, libbitcoin_server.a
no longer depends on libbitcoin_wallet.a
- the other way is fine, a circular dependency is not).
Ignoring the GUI for now (which still needs some work in this direction), the following are left:
init.cpp
: these are mostly self-contained and short. ([wallet] Remove Wallet dependencies from init.cpp #10762)- print BerkeleyDB version should probably be moved to
CWallet::InitLoadWallet
CWallet::Verify
(fixed in init: Move berkeleydb version reporting to wallet #8036). - wallet-specfic option interaction (
-walletbroadcast
,-prune
+-rescan
) should move to wallet module (possibly a new call that can be called in addition toInitParameterInteraction()
) - printing setKeyPool size etc should probably be moved to
CWallet::InitLoadWallet
. - wallet initialization/verify/shutdown - maybe this could be replaced by a general registration system for initialization/interrupt/shutdown functions, called as signals in the appropriate places. The same could be used by other modules
-
-disablewallet
could result in the wallet not being registered at all, and that can all be handled from outside init.
- print BerkeleyDB version should probably be moved to
- RPC still has some calls that vary depending on wallet support. We should split these up. This is the more annoying part as it will involve API changes. No non-wallet RPC call should make an assumption about "a wallet".
rpcmisc.cpp
-
getinfo
- this call is already on the list to be deprecated for a long time ((finally) remove getinfo #10838) -
validateaddress
- should be split up into an utility-onlyvalidateaddress
and a wallet-specific callgetaddressinfo
(name open for discussion) ([RPC] Split part of validateaddress into getaddressinfo #10583) -
createmultisig
- same.createmultisig
andwalletcreatemultisig
or so ([RPC] Disallow using addresses in createmultisig #11415)
-
-
rpcblockchain.cpp
-
signrawtransaction
- should be split into an utility-onlysignrawtransaction
and a wallet-specific callwalletsignrawtransaction
([RPC] Split signrawtransaction into wallet and non-wallet RPC command #10579)
-
- remove deprecated
validateaddress
andsignrawtransaction
wallet dependency completely ([Wallet] [RPC] Remove deprecated wallet rpc features from bitcoin_server #12490)
- Mining: no
ENABLE_WALLET
but an implicit assumption and a circuitous registration system. Thegenerate
call should be a wallet-specific call, whereasgeneratetoaddress
is core. See discussion in [mining] allow other signal listeners to provide scripts for mining #6481. (done in rpc: Move thegenerate
RPC call to rpcwallet #10683). - in
httprpc.cpp
, there are #ifdef ENABLE_WALLETs protecting registration/unregistration of the wallet endpoint. These can trivially be replaced with calls into the WalletInitInterface. - in
interfaces/node.cpp
, #ifdef ENABLE_WALLET protects the calls to getWallets(). This can easily be replaced by calls into a wallet manager/dummy wallet manager.
The first phase would be to introduce the new (wallet-only) methods, then a release later remove wallet functionality from the core-only calls.
maflcko, btcdrak, jonasschnelli and realChainLiferealChainLife