Merge bitcoin/bitcoin#25253: test: add coverage for non-hex value to -minimumchainwork
ebfc308ea4test: add coverage for non-hex value to -minimumchainwork (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/b9ef5a10e2fa4609d048db57b99463305455ebe4/src/init.cpp#L917-L919 Passing a non-hex value to -minimumchainwork should throw an initial error. ACKs for top commit: laanwj: Code review ACKebfc308ea4kristapsk: re-ACKebfc308ea4Tree-SHA512: c665903757ae3b8b2480df97bb888e60ba4387b009fcb8031041822e87a155a0e4950ebe79873c1034f0826504521d82b1fdfdb5e8378b227d14ca545b8d4e11
This commit is contained in:
1 file changed
+8
@@ -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()
|
||||
Reference in new issue
Block a user