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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user