Merge bitcoin/bitcoin#24039: bug fix: prevent UnicodeDecodeError when opening log file in feature_init.py

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

Pull request description:

  Should fix #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 9d3e95d77c

Tree-SHA512: 6e3e57cac5f4865b3894ee4e9fcd9eb2690e824af20e34b4595722bd7043b0c3fe417cc1bfcff25fbab95c66418d3fce13434bd63d0244875a867d08853a5644
This commit is contained in:
MarcoFalke 2022-01-12 09:29:26 +01:00
commit db1f04fa8c
No known key found for this signature in database
GPG Key ID: CE2B75697E69A548

View File

@ -93,7 +93,7 @@ class InitStressTest(BitcoinTestFramework):
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()