mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-04 19:08:51 +02:00
Merge bitcoin/bitcoin#30148: cli: restrict multiple exclusive argument usage in bitcoin-cli
c8e6771af0test: restrict multiple CLI arguments (naiyoma)8838c4f171common/args.h: automate check for multiple cli commands (naiyoma) Pull request description: This PR is a continuation of the validation suggested [here](https://github.com/bitcoin/bitcoin/pull/27815) to ensure that only one Request Handler can be specified at a time. ACKs for top commit: stratospher: reACKc8e6771. achow101: ACKc8e6771af0tdb3: cr re ACKc8e6771af0Tree-SHA512: f4fe036fee342a54f1a7ac702ac35c40bf3d420fde6ab16313a75327292d5ee5c8ece1be9f852a13fcf73da1148b143b37b4894e294052abdde6eefb2e8c6f3f
This commit is contained in:
@@ -381,6 +381,9 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||
assert_raises_process_error(1, "Could not connect to the server", self.nodes[0].cli('-rpcwait', '-rpcwaittimeout=5').echo)
|
||||
assert_greater_than_or_equal(time.time(), start_time + 5)
|
||||
|
||||
self.log.info("Test that only one of -addrinfo, -generate, -getinfo, -netinfo may be specified at a time")
|
||||
assert_raises_process_error(1, "Only one of -getinfo, -netinfo may be specified", self.nodes[0].cli('-getinfo', '-netinfo').send_cli)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
TestBitcoinCli(__file__).main()
|
||||
|
||||
Reference in New Issue
Block a user