aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-08-10 13:51:14 +0200
committerMacroFake <falke.marco@gmail.com>2022-08-10 13:51:44 +0200
commitebf094ff3af80c28b80383f94292143533d5ed49 (patch)
tree36c514fc4a1a16fd82d19548a889094b3760fdf9 /test/functional
parentac59112a6a093e641ce2803260dd9de97b1cd961 (diff)
parent155344960b16d4b27dec3197dc273b03e6aed57d (diff)
downloadbitcoin-ebf094ff3af80c28b80383f94292143533d5ed49.tar.xz
Merge bitcoin/bitcoin#25731: test: negative/unknown `rpcserialversion` should throw an init error
155344960b16d4b27dec3197dc273b03e6aed57d test: negative/unknown `rpcserialversion` should throw an init error (brunoerg) Pull request description: This PR adds test coverage for the following init errors: https://github.com/bitcoin/bitcoin/blob/41205bf442254d17bc7885f3b2693749da714a0e/src/init.cpp#L1025-L1030 Top commit has no ACKs. Tree-SHA512: 4456949e9a13908a5a59b13ed57bc3002b7ffd626e8dfb0346aa2600937ba1ef1b69cbae45cdb6bbc1c019dbcd64844e736a2ddd671a4704e53804355b6ea9f9
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/feature_segwit.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py
index f0faf1421b..7f2a615be1 100755
--- a/test/functional/feature_segwit.py
+++ b/test/functional/feature_segwit.py
@@ -609,6 +609,11 @@ class SegWitTest(BitcoinTestFramework):
assert_equal(self.nodes[1].gettransaction(txid, True)["txid"], txid)
assert_equal(self.nodes[1].listtransactions("*", 1, 0, True)[0]["txid"], txid)
+ self.log.info('Test negative and unknown rpcserialversion throw an init error')
+ self.stop_node(0)
+ self.nodes[0].assert_start_raises_init_error(["-rpcserialversion=-1"], "Error: rpcserialversion must be non-negative.")
+ self.nodes[0].assert_start_raises_init_error(["-rpcserialversion=100"], "Error: Unknown rpcserialversion requested.")
+
def mine_and_test_listunspent(self, script_list, ismine):
utxo = find_spendable_utxo(self.nodes[0], 50)
tx = CTransaction()