mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
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:
@@ -142,9 +142,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
|
||||
bool isPrivkey = find_value(metadata, "isPrivkey").get_bool();
|
||||
bool isTestnet = find_value(metadata, "isTestnet").get_bool();
|
||||
if (isTestnet)
|
||||
SelectParams(CChainParams::TESTNET);
|
||||
SelectParams(CBaseChainParams::TESTNET);
|
||||
else
|
||||
SelectParams(CChainParams::MAIN);
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
if(isPrivkey)
|
||||
{
|
||||
bool isCompressed = find_value(metadata, "isCompressed").get_bool();
|
||||
@@ -175,7 +175,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_parse)
|
||||
BOOST_CHECK_MESSAGE(!secret.IsValid(), "IsValid pubkey as privkey:" + strTest);
|
||||
}
|
||||
}
|
||||
SelectParams(CChainParams::MAIN);
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
}
|
||||
|
||||
// Goal: check that generated keys match test vectors
|
||||
@@ -198,9 +198,9 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
|
||||
bool isPrivkey = find_value(metadata, "isPrivkey").get_bool();
|
||||
bool isTestnet = find_value(metadata, "isTestnet").get_bool();
|
||||
if (isTestnet)
|
||||
SelectParams(CChainParams::TESTNET);
|
||||
SelectParams(CBaseChainParams::TESTNET);
|
||||
else
|
||||
SelectParams(CChainParams::MAIN);
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
if(isPrivkey)
|
||||
{
|
||||
bool isCompressed = find_value(metadata, "isCompressed").get_bool();
|
||||
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(base58_keys_valid_gen)
|
||||
CTxDestination nodest = CNoDestination();
|
||||
BOOST_CHECK(!dummyAddr.Set(nodest));
|
||||
|
||||
SelectParams(CChainParams::MAIN);
|
||||
SelectParams(CBaseChainParams::MAIN);
|
||||
}
|
||||
|
||||
// Goal: check that base58 parsing code is robust against a variety of corrupted data
|
||||
|
||||
Reference in New Issue
Block a user