Merge bitcoin/bitcoin#25511: test: non-positive integer value to -peertimeout should throw an error

d22bd543cc test: passing a non-positive integer value to `-peertimeout` should throw an error (brunoerg)

Pull request description:

  This PR adds test coverage for #25506, since #25505 gets closed.

ACKs for top commit:
  kristapsk:
    ACK d22bd543cc
  w0xlt:
    ACK d22bd543cc
  1440000bytes:
    ACK d22bd543cc

Tree-SHA512: 89c8a097606cb52569d816cc2227baac832df70e381d07c4a12aeb024c500d334c8102218fc6519eebb3819159d8308119d7253d9192a6bebe13b8e738b286b9
This commit is contained in:
MacroFake 2022-06-30 16:09:50 +02:00
commit b6cf0f8848
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -94,6 +94,11 @@ class TimeoutsTest(BitcoinTestFramework):
no_version_node.wait_for_disconnect(timeout=1)
no_send_node.wait_for_disconnect(timeout=1)
self.stop_nodes(0)
self.nodes[0].assert_start_raises_init_error(
expected_msg='Error: peertimeout must be a positive integer.',
extra_args=['-peertimeout=0'],
)
if __name__ == '__main__':
TimeoutsTest().main()