mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-21 14:34:49 +01:00
Merge bitcoin/bitcoin#25253: test: add coverage for non-hex value to -minimumchainwork
ebfc308ea4
test: add coverage for non-hex value to -minimumchainwork (brunoerg) Pull request description: This PR adds test coverage for the following init error:b9ef5a10e2/src/init.cpp (L917-L919)
Passing a non-hex value to -minimumchainwork should throw an initial error. ACKs for top commit: laanwj: Code review ACKebfc308ea4
kristapsk: re-ACKebfc308ea4
Tree-SHA512: c665903757ae3b8b2480df97bb888e60ba4387b009fcb8031041822e87a155a0e4950ebe79873c1034f0826504521d82b1fdfdb5e8378b227d14ca545b8d4e11
This commit is contained in:
commit
1f932de673
1 changed files with 8 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue