Remove unnecessary dependencies for bitcoin-cli
This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
This commit is contained in:
@@ -546,7 +546,7 @@ int main(int argc, char *argv[])
|
||||
if (!PaymentServer::ipcParseCommandLine(argc, argv))
|
||||
exit(0);
|
||||
#endif
|
||||
bool isaTestNet = Params().NetworkID() != CChainParams::MAIN;
|
||||
bool isaTestNet = Params().NetworkID() != CBaseChainParams::MAIN;
|
||||
// Allow for separate UI settings for testnets
|
||||
if (isaTestNet)
|
||||
QApplication::setApplicationName(QAPP_APP_NAME_TESTNET);
|
||||
|
||||
@@ -199,10 +199,10 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
|
||||
{
|
||||
CBitcoinAddress address(r.address.toStdString());
|
||||
|
||||
SelectParams(CChainParams::MAIN);
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
if (!address.IsValid())
|
||||
{
|
||||
SelectParams(CChainParams::TESTNET);
|
||||
SelectParams(CBaseChainParams::TESTNET);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -214,9 +214,9 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[])
|
||||
if (readPaymentRequest(arg, request))
|
||||
{
|
||||
if (request.getDetails().network() == "main")
|
||||
SelectParams(CChainParams::MAIN);
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
else
|
||||
SelectParams(CChainParams::TESTNET);
|
||||
SelectParams(CBaseChainParams::TESTNET);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -56,6 +56,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
|
||||
|
||||
void PaymentServerTests::paymentServerTests()
|
||||
{
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
OptionsModel optionsModel;
|
||||
PaymentServer* server = new PaymentServer(NULL, false);
|
||||
X509_STORE* caStore = X509_STORE_new();
|
||||
|
||||
Reference in New Issue
Block a user