Skip to content

Commit

Permalink
Merge bitcoin#25451: test: -whitebind and -bind with -listen=0
Browse files Browse the repository at this point in the history
…should throw an error

ceec680 test: `-whitebind` and `-bind`  with `-listen=0` should throw an error (brunoerg)

Pull request description:

  This PR adds test coverage for the following init error:
  https://github.com/bitcoin/bitcoin/blob/b9122e95f0f4ff5d2b2e21a5caf6c69d488c0347/src/init.cpp#L872-L875

ACKs for top commit:
  laanwj:
    Code review ACK ceec680

Tree-SHA512: 03068abe7199b1235f029871ab87a3dd4943738c592ad62d82cdcd3e0201e627624960bd3ea1fc6fc1e7da4b8e215ba3393d1cb8130e1108049f764e51dc75c0
  • Loading branch information
MacroFake committed Jun 23, 2022
2 parents bc83710 + ceec680 commit 01e9e2d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/p2p_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def run_test(self):
self.nodes[1].assert_start_raises_init_error(["[email protected]"], "Invalid P2P permission", match=ErrorMatch.PARTIAL_REGEX)
self.nodes[1].assert_start_raises_init_error(["[email protected]:230"], "Invalid netmask specified in", match=ErrorMatch.PARTIAL_REGEX)
self.nodes[1].assert_start_raises_init_error(["[email protected]/10"], "Cannot resolve -whitebind address", match=ErrorMatch.PARTIAL_REGEX)
self.nodes[1].assert_start_raises_init_error(["[email protected]", "-bind=127.0.0.1", "-listen=0"], "Cannot set -bind or -whitebind together with -listen=0", match=ErrorMatch.PARTIAL_REGEX)

def check_tx_relay(self):
block_op_true = self.nodes[0].getblock(self.generatetoaddress(self.nodes[0], 100, ADDRESS_BCRT1_P2WSH_OP_TRUE)[0])
Expand Down

0 comments on commit 01e9e2d

Please sign in to comment.