Skip to content

Commit

Permalink
test: enable txindex in feature_init
Browse files Browse the repository at this point in the history
Summary:
> Now that [[bitcoin/bitcoin#23365 | core#23365]] is merged.

[[bitcoin/bitcoin#23365 | core#23365]] was backported in D11299

This concludes backport of [[bitcoin/bitcoin#23737 | core#23737]]
bitcoin/bitcoin@8904f17

Depends on D12614

Test Plan: `ninja check-functional`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D12615
  • Loading branch information
jamesob authored and PiRK committed Nov 25, 2022
1 parent b8b10db commit 7a31619
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions test/functional/feature_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ def sigterm_node():

def check_clean_start():
"""Ensure that node restarts successfully after various interrupts."""
# TODO: add -txindex=1 to fully test index initiatlization.
# See https://github.com/bitcoin/bitcoin/pull/23289#discussion_r735159180 for
# a discussion of the related bug.
node.start()
node.wait_for_rpc_connection()
assert_equal(200, node.getblockcount())
Expand All @@ -69,20 +66,18 @@ def check_clean_start():
'net thread start',
'addcon thread start',
'loadblk thread start',
# TODO: re-enable - see above TODO
# 'txindex thread start',
'txindex thread start',
'msghand thread start',
'net thread start',
'addcon thread start',
]
if self.is_wallet_compiled():
lines_to_terminate_after.append('Verifying wallet')

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

num_total_logs = node.wait_for_debug_log(
[terminate_line], ignore_case=True)
Expand All @@ -101,10 +96,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(
# TODO: add -txindex=1 to fully test index initiatlization.
# extra_args=['-txindex=1'],
)
node.start(extra_args=['-txindex=1'])
logfile = open(node.debug_log_path, 'r', encoding='utf8')

MAX_SECS_TO_WAIT = 10
Expand Down Expand Up @@ -158,8 +150,7 @@ def check_clean_start():
# successfully?) so investigate doing this later.

node.assert_start_raises_init_error(
# TODO: add -txindex=1 to fully test index initiatlization.
# extra_args=['-txindex=1'],
extra_args=['-txindex=1'],
expected_msg=err_fragment,
match=ErrorMatch.PARTIAL_REGEX,
)
Expand Down

0 comments on commit 7a31619

Please sign in to comment.