From ebfc308ea4b8851118e8194d837556bf443c329c Mon Sep 17 00:00:00 2001 From: brunoerg Date: Mon, 30 May 2022 17:51:53 -0300 Subject: [PATCH] test: add coverage for non-hex value to -minimumchainwork --- test/functional/feature_minchainwork.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/functional/feature_minchainwork.py b/test/functional/feature_minchainwork.py index f6432ed20eb..fa10855a987 100755 --- a/test/functional/feature_minchainwork.py +++ b/test/functional/feature_minchainwork.py @@ -106,5 +106,13 @@ class MinimumChainWorkTest(BitcoinTestFramework): # not be exercising the logic we want!) assert_equal(self.nodes[2].getblockchaininfo()['initialblockdownload'], True) + self.log.info("Test -minimumchainwork with a non-hex value") + self.stop_node(0) + self.nodes[0].assert_start_raises_init_error( + ["-minimumchainwork=test"], + expected_msg='Error: Invalid non-hex (test) minimum chain work value specified', + ) + + if __name__ == '__main__': MinimumChainWorkTest().main()