aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-08-18 17:27:37 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2021-08-23 18:11:37 +0200
commit7720d4f650015272dc7109238230520f71858c6c (patch)
tree06d064bb6ee8ba319775738aacd3c605e094b7c5 /test/functional
parent646b3885f795c640a2ac979362c509c4a8ee592a (diff)
test: fix failure in feature_nulldummy.py on single-core machines
On single-core machines, executing the test feature_nulldummy.py results in the following assertion error: ... 2021-08-18T15:37:58.805000Z TestFramework (INFO): Test 4: Non-NULLDUMMY base multisig transaction is invalid after activation 2021-08-18T15:37:58.814000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "[...]/test/functional/test_framework/test_framework.py", line 131, in main self.run_test() File "[...]/test/functional/feature_nulldummy.py", line 107, in run_test self.block_submit(self.nodes[0], [test4tx], accept=False) File "[...]/test/functional/feature_nulldummy.py", line 134, in block_submit assert_equal(None if accept else 'block-validation-failed', node.submitblock(block.serialize().hex())) File "[...]/test/functional/test_framework/util.py", line 49, in assert_equal raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not(block-validation-failed == non-mandatory-script-verify-flag (Dummy CHECKMULTISIG argument must be zero)) 2021-08-18T15:37:58.866000Z TestFramework (INFO): Stopping nodes ... The behaviour can be reproduced on a multi-core machine by simply changing the function GetNumCores() (in src/util/system.cpp) to return 1: int GetNumCores() { return 1; }
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/feature_nulldummy.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/functional/feature_nulldummy.py b/test/functional/feature_nulldummy.py
index 0f2d47f4b1..678e103e5f 100755
--- a/test/functional/feature_nulldummy.py
+++ b/test/functional/feature_nulldummy.py
@@ -54,6 +54,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
self.extra_args = [[
f'-segwitheight={COINBASE_MATURITY + 5}',
'-addresstype=legacy',
+ '-par=1', # Use only one script thread to get the exact reject reason for testing
]]
def skip_test_if_missing_module(self):
@@ -131,7 +132,7 @@ class NULLDUMMYTest(BitcoinTestFramework):
add_witness_commitment(block)
block.rehash()
block.solve()
- assert_equal(None if accept else 'block-validation-failed', node.submitblock(block.serialize().hex()))
+ assert_equal(None if accept else NULLDUMMY_ERROR, node.submitblock(block.serialize().hex()))
if accept:
assert_equal(node.getbestblockhash(), block.hash)
self.lastblockhash = block.hash