Skip to content

Commit 8904f17

Browse files
committed
test: enable txindex in feature_init
Now that #23365 is merged.
1 parent 93db6d8 commit 8904f17

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

test/functional/feature_init.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ def sigterm_node():
4747

4848
def check_clean_start():
4949
"""Ensure that node restarts successfully after various interrupts."""
50-
# TODO: add -txindex=1 to fully test index initiatlization.
51-
# See https://github.com/bitcoin/bitcoin/pull/23289#discussion_r735159180 for
52-
# a discussion of the related bug.
5350
node.start()
5451
node.wait_for_rpc_connection()
5552
assert_equal(200, node.getblockcount())
@@ -69,19 +66,17 @@ def check_clean_start():
6966
'net thread start',
7067
'addcon thread start',
7168
'loadblk thread start',
72-
# TODO: re-enable - see above TODO
73-
# 'txindex thread start',
74-
'msghand thread start'
69+
'txindex thread start',
70+
'msghand thread start',
71+
'net thread start',
72+
'addcon thread start',
7573
]
7674
if self.is_wallet_compiled():
7775
lines_to_terminate_after.append('Verifying wallet')
7876

7977
for terminate_line in lines_to_terminate_after:
8078
self.log.info(f"Starting node and will exit after line '{terminate_line}'")
81-
node.start(
82-
# TODO: add -txindex=1 to fully test index initiatlization.
83-
# extra_args=['-txindex=1'],
84-
)
79+
node.start(extra_args=['-txindex=1'])
8580

8681
num_total_logs = node.wait_for_debug_log([terminate_line], ignore_case=True)
8782
self.log.debug(f"Terminating node after {num_total_logs} log lines seen")
@@ -97,10 +92,7 @@ def check_clean_start():
9792
num_logs = len(Path(node.debug_log_path).read_text().splitlines())
9893
additional_lines = random.randint(1, num_total_logs)
9994
self.log.debug(f"Starting node and will exit after {additional_lines} lines")
100-
node.start(
101-
# TODO: add -txindex=1 to fully test index initiatlization.
102-
# extra_args=['-txindex=1'],
103-
)
95+
node.start(extra_args=['-txindex=1'])
10496
logfile = open(node.debug_log_path, 'r', encoding='utf8')
10597

10698
MAX_SECS_TO_WAIT = 10
@@ -152,8 +144,7 @@ def check_clean_start():
152144
# investigate doing this later.
153145

154146
node.assert_start_raises_init_error(
155-
# TODO: add -txindex=1 to fully test index initiatlization.
156-
# extra_args=['-txindex=1'],
147+
extra_args=['-txindex=1'],
157148
expected_msg=err_fragment,
158149
match=ErrorMatch.PARTIAL_REGEX,
159150
)

0 commit comments

Comments
 (0)