Skip to content

Commit ebf094f

Browse files
author
MacroFake
committed
Merge bitcoin/bitcoin#25731: test: negative/unknown rpcserialversion should throw an init error
1553449 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
2 parents ac59112 + 1553449 commit ebf094f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/functional/feature_segwit.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,11 @@ def run_test(self):
609609
assert_equal(self.nodes[1].gettransaction(txid, True)["txid"], txid)
610610
assert_equal(self.nodes[1].listtransactions("*", 1, 0, True)[0]["txid"], txid)
611611

612+
self.log.info('Test negative and unknown rpcserialversion throw an init error')
613+
self.stop_node(0)
614+
self.nodes[0].assert_start_raises_init_error(["-rpcserialversion=-1"], "Error: rpcserialversion must be non-negative.")
615+
self.nodes[0].assert_start_raises_init_error(["-rpcserialversion=100"], "Error: Unknown rpcserialversion requested.")
616+
612617
def mine_and_test_listunspent(self, script_list, ismine):
613618
utxo = find_spendable_utxo(self.nodes[0], 50)
614619
tx = CTransaction()

0 commit comments

Comments
 (0)