aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_init.py
diff options
context:
space:
mode:
authorL0la L33tz <L0l4L33tz@proton.me>2023-10-08 16:58:45 +0200
committerL0la L33tz <L0l4L33tz@proton.me>2023-10-08 17:25:56 +0200
commit5ab6419f380cc0a8cde78b125f3eeee5fcba43ae (patch)
tree9b17fdcca23e785c08ebbc50a71a70a682585908 /test/functional/feature_init.py
parent64b80d5c5bc1311cd2fb188f2d84aff6704e27d7 (diff)
downloadbitcoin-5ab6419f380cc0a8cde78b125f3eeee5fcba43ae.tar.xz
test: randomized perturbing in feature_init
Diffstat (limited to 'test/functional/feature_init.py')
-rwxr-xr-xtest/functional/feature_init.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/feature_init.py b/test/functional/feature_init.py
index 1b657e2c47..37ef3de4dd 100755
--- a/test/functional/feature_init.py
+++ b/test/functional/feature_init.py
@@ -5,6 +5,7 @@
"""Stress tests related to node initialization."""
import os
from pathlib import Path
+from random import randint
import shutil
from test_framework.test_framework import BitcoinTestFramework, SkipTest
@@ -137,8 +138,8 @@ class InitStressTest(BitcoinTestFramework):
# Since the genesis block is not checked by -checkblocks, the
# perturbation window must be chosen such that a higher block
# in blk*.dat is affected.
- tf.seek(150)
- tf.write(b'1' * 200)
+ tf.seek(randint (150, 15000))
+ tf.write(b'1' * randint(20, 2000))
start_expecting_error(err_fragment)