mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
test: Avoid intermittent failures in feature_init
This commit is contained in:
parent
88c3b100f0
commit
44445ae8f1
1 changed files with 3 additions and 4 deletions
|
@ -1,11 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Copyright (c) 2021-2022 The Bitcoin Core developers
|
# Copyright (c) 2021-present The Bitcoin Core developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
"""Stress tests related to node initialization."""
|
"""Stress tests related to node initialization."""
|
||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from random import randint
|
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
from test_framework.test_framework import BitcoinTestFramework, SkipTest
|
from test_framework.test_framework import BitcoinTestFramework, SkipTest
|
||||||
|
@ -138,8 +137,8 @@ class InitStressTest(BitcoinTestFramework):
|
||||||
# Since the genesis block is not checked by -checkblocks, the
|
# Since the genesis block is not checked by -checkblocks, the
|
||||||
# perturbation window must be chosen such that a higher block
|
# perturbation window must be chosen such that a higher block
|
||||||
# in blk*.dat is affected.
|
# in blk*.dat is affected.
|
||||||
tf.seek(randint (150, 15000))
|
tf.seek(150)
|
||||||
tf.write(b'1' * randint(20, 2000))
|
tf.write(b"1" * 200)
|
||||||
|
|
||||||
start_expecting_error(err_fragment)
|
start_expecting_error(err_fragment)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue