Skip to content

Commit 44445ae

Browse files
author
MarcoFalke
committed
test: Avoid intermittent failures in feature_init
1 parent 88c3b10 commit 44445ae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/functional/feature_init.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
#!/usr/bin/env python3
2-
# Copyright (c) 2021-2022 The Bitcoin Core developers
2+
# Copyright (c) 2021-present The Bitcoin Core developers
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55
"""Stress tests related to node initialization."""
66
import os
77
from pathlib import Path
8-
from random import randint
98
import shutil
109

1110
from test_framework.test_framework import BitcoinTestFramework, SkipTest
@@ -138,8 +137,8 @@ def check_clean_start():
138137
# Since the genesis block is not checked by -checkblocks, the
139138
# perturbation window must be chosen such that a higher block
140139
# in blk*.dat is affected.
141-
tf.seek(randint (150, 15000))
142-
tf.write(b'1' * randint(20, 2000))
140+
tf.seek(150)
141+
tf.write(b"1" * 200)
143142

144143
start_expecting_error(err_fragment)
145144

0 commit comments

Comments
 (0)