mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
test: randomized perturbing in feature_init
This commit is contained in:
parent
64b80d5c5b
commit
5ab6419f38
1 changed files with 3 additions and 2 deletions
|
@ -5,6 +5,7 @@
|
||||||
"""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
|
||||||
|
@ -137,8 +138,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(150)
|
tf.seek(randint (150, 15000))
|
||||||
tf.write(b'1' * 200)
|
tf.write(b'1' * randint(20, 2000))
|
||||||
|
|
||||||
start_expecting_error(err_fragment)
|
start_expecting_error(err_fragment)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue