@@ -47,9 +47,6 @@ def sigterm_node():
47
47
48
48
def check_clean_start ():
49
49
"""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.
53
50
node .start ()
54
51
node .wait_for_rpc_connection ()
55
52
assert_equal (200 , node .getblockcount ())
@@ -69,19 +66,17 @@ def check_clean_start():
69
66
'net thread start' ,
70
67
'addcon thread start' ,
71
68
'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' ,
75
73
]
76
74
if self .is_wallet_compiled ():
77
75
lines_to_terminate_after .append ('Verifying wallet' )
78
76
79
77
for terminate_line in lines_to_terminate_after :
80
78
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' ])
85
80
86
81
num_total_logs = node .wait_for_debug_log ([terminate_line ], ignore_case = True )
87
82
self .log .debug (f"Terminating node after { num_total_logs } log lines seen" )
@@ -97,10 +92,7 @@ def check_clean_start():
97
92
num_logs = len (Path (node .debug_log_path ).read_text ().splitlines ())
98
93
additional_lines = random .randint (1 , num_total_logs )
99
94
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' ])
104
96
logfile = open (node .debug_log_path , 'r' , encoding = 'utf8' )
105
97
106
98
MAX_SECS_TO_WAIT = 10
@@ -152,8 +144,7 @@ def check_clean_start():
152
144
# investigate doing this later.
153
145
154
146
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' ],
157
148
expected_msg = err_fragment ,
158
149
match = ErrorMatch .PARTIAL_REGEX ,
159
150
)
0 commit comments