Skip to content

Commit

Permalink
Merge bitcoin#24039: bug fix: prevent UnicodeDecodeError when opening…
Browse files Browse the repository at this point in the history
… log file in feature_init.py

9d3e95d [bugfix] prevent UnicodeDecodeError errors when opening log file in feature_init.py (sogoagain)

Pull request description:

  Should fix bitcoin#23989

  To fix a bug, I modified `feature_init.py` to open the log file as a byte stream when opening it.
  thank you.

ACKs for top commit:
  MarcoFalke:
    review ACK 9d3e95d

Tree-SHA512: 6e3e57cac5f4865b3894ee4e9fcd9eb2690e824af20e34b4595722bd7043b0c3fe417cc1bfcff25fbab95c66418d3fce13434bd63d0244875a867d08853a5644
  • Loading branch information
MarcoFalke committed Jan 12, 2022
2 parents c561f2f + 9d3e95d commit db1f04f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/functional/feature_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def check_clean_start():
additional_lines = random.randint(1, num_total_logs)
self.log.debug(f"Starting node and will exit after {additional_lines} lines")
node.start(extra_args=['-txindex=1'])
logfile = open(node.debug_log_path, 'r', encoding='utf8')
logfile = open(node.debug_log_path, 'rb')

MAX_SECS_TO_WAIT = 10
start = time.time()
Expand Down

0 comments on commit db1f04f

Please sign in to comment.