Skip to content

Commit

Permalink
test: simplify feature_init
Browse files Browse the repository at this point in the history
  • Loading branch information
fjahr authored and L0laL33tz committed Oct 8, 2023
1 parent d2b8c5e commit 64b80d5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/functional/feature_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,12 @@ def check_clean_start():

for target_file in target_files:
self.log.info(f"Perturbing file to ensure failure {target_file}")
with open(target_file, "rb") as tf_read:
contents = tf_read.read()
tweaked_contents = bytearray(contents)
with open(target_file, "r+b") as tf:
# 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.
tweaked_contents[150:350] = b'1' * 200
with open(target_file, "wb") as tf_write:
tf_write.write(bytes(tweaked_contents))
tf.seek(150)
tf.write(b'1' * 200)

start_expecting_error(err_fragment)

Expand Down

0 comments on commit 64b80d5

Please sign in to comment.