Skip to content

Commit 1f932de

Browse files
author
MacroFake
committed
Merge bitcoin#25253: test: add coverage for non-hex value to -minimumchainwork
ebfc308 test: 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 ACK ebfc308 kristapsk: re-ACK ebfc308 Tree-SHA512: c665903757ae3b8b2480df97bb888e60ba4387b009fcb8031041822e87a155a0e4950ebe79873c1034f0826504521d82b1fdfdb5e8378b227d14ca545b8d4e11
2 parents 5f65aff + ebfc308 commit 1f932de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/functional/feature_minchainwork.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,13 @@ def run_test(self):
106106
# not be exercising the logic we want!)
107107
assert_equal(self.nodes[2].getblockchaininfo()['initialblockdownload'], True)
108108

109+
self.log.info("Test -minimumchainwork with a non-hex value")
110+
self.stop_node(0)
111+
self.nodes[0].assert_start_raises_init_error(
112+
["-minimumchainwork=test"],
113+
expected_msg='Error: Invalid non-hex (test) minimum chain work value specified',
114+
)
115+
116+
109117
if __name__ == '__main__':
110118
MinimumChainWorkTest().main()

0 commit comments

Comments
 (0)