mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
Merge #16097: Refactor: Add Flags enum to ArgsManager class
e6f649cb2ctest: Make tests arg type specific (Hennadii Stepanov)b70cc5d733Revamp option negating policy (Hennadii Stepanov)db08edb303Replace IsArgKnown() with FlagsOfKnownArg() (Hennadii Stepanov)dde80c272aUse ArgsManager::NETWORK_ONLY flag (Hennadii Stepanov)9a12733508Remove unused m_debug_only member from Arg struct (Hennadii Stepanov)fb4b9f9e3bscripted-diff: Use ArgsManager::DEBUG_ONLY flag (Hennadii Stepanov)1b4b9422cascripted-diff: Use Flags enum in AddArg() (Hennadii Stepanov)265c1b58d8Add Flags enum to ArgsManager (Hennadii Stepanov)e0d187dfebRefactor InterpretNegatedOption() function (Hennadii Stepanov)e0e18a1017refactoring: Check IsArgKnown() early (Hennadii Stepanov) Pull request description: This PR adds the `Flags` enum to the `ArgsManager` class. Also the `m_flags` member is added to the `Arg` struct. Flags denote an allowed type of an arg value and special hints. This PR is only a refactoring and does not change behavior. ACKs for top commit: jamesob: ACKe6f649cb2cMarcoFalke: ACKe6f649cb2cthanks for adding types to the command line options Tree-SHA512: b867f8a9cbce2d2473c293d534af662d8cd5be15060ff0682e97af678974bdaac35e8bc6328ccba32f105034bcd38f169b92a6fb67798667891ce14d5d2a2dea
This commit is contained in:
@@ -35,9 +35,10 @@ class ConfArgsTest(BitcoinTestFramework):
|
||||
conf.write('-dash=1\n')
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg='Error: Error reading configuration file: parse error on line 1: -dash=1, options in configuration file must be specified without leading -')
|
||||
|
||||
with open(inc_conf_file_path, 'w', encoding='utf8') as conf:
|
||||
conf.write("wallet=foo\n")
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg='Error: Config setting for -wallet only applied on regtest network when in [regtest] section.')
|
||||
if self.is_wallet_compiled():
|
||||
with open(inc_conf_file_path, 'w', encoding='utf8') as conf:
|
||||
conf.write("wallet=foo\n")
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg='Error: Config setting for -wallet only applied on regtest network when in [regtest] section.')
|
||||
|
||||
with open(inc_conf_file_path, 'w', encoding='utf-8') as conf:
|
||||
conf.write('regtest=0\n') # mainnet
|
||||
|
||||
Reference in New Issue
Block a user