mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-20 04:36:08 +01:00
Merge #12878: [refactor] Config handling refactoring in preparation for network-specific sections
77a733a99[tests] Add additional unit tests for -nofoo edge cases (Anthony Towns)af173c2be[tests] Check GetChainName works with config entries (Anthony Towns)fa27f1c23[tests] Add unit tests for ReadConfigStream (Anthony Towns)087c5d204ReadConfigStream: assume the stream is good (Anthony Towns)6d5815aadSeparate out ReadConfigStream from ReadConfigFile (Anthony Towns)834d30341[tests] Add unit tests for GetChainName (Anthony Towns)11b6b5b86Move ChainNameFromCommandLine into ArgsManager and rename to GetChainName (Anthony Towns) Pull request description: This does a bit of refactoring of the configuration handling code in order to add additional tests to make adding support for [test]/[regtest] sections in the config file in #11862 easier. Should not cause any behaviour changes. Tree-SHA512: 8d2ce1449fc180de03414e7e569d1a21ba1e9f6564e13d3faf3961f710adc725fa0d4ab49b89ebd2baa11ea36ac5018377f693a84037d386a8b8697c9d6db3e9
This commit is contained in:
@@ -627,7 +627,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Check for -testnet or -regtest parameter (Params() calls are only valid after this clause)
|
||||
try {
|
||||
node->selectParams(ChainNameFromCommandLine());
|
||||
node->selectParams(gArgs.GetChainName());
|
||||
} catch(std::exception &e) {
|
||||
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: %1").arg(e.what()));
|
||||
return EXIT_FAILURE;
|
||||
|
||||
Reference in New Issue
Block a user