This adds an executable bitcoin-rpc that only serves as a Bitcoin RPC client.
The commit does not remove RPC functionality from the bitcoind yet, this functionality should be deprecated but is left for a later version to give users some time to switch.
To try to remove RPC client dependency on BDB and leveldb I
- Moved HelpMessage from
init.cpptoutil.cpp - Split
bitcoinrpc.cppintorpcprotocol.cpp,rpcclient.cppandrpcserver.cpp
Still this was not successful. It turns out that util.cpp, through Params().DataDir() in GetDataDir(fNetSpecific=true) depends on the block chain parameters, and that way pulls in all the core files (core.cpp, blockchain.cpp) including the ones that need leveldb and BDB.
Splitting util.cpp would be possible (as the RPC client only needs the un-specific data dir to get at the configuration file) although somewhat more thinking is required. This would result in many more changes so let's leave it for later.
Note: This leaves the only usage of fHaveGUI left in wallet.cpp: https://github.com/bitcoin/bitcoin/blob/master/src/wallet.cpp#L486 which deals with the default key which we want to remove. After this, the variable can be removed from the core. This is outside the scope of this pull though.