-
Notifications
You must be signed in to change notification settings - Fork 37.7k
test: add missing stop_node calls to feature_coinstatsindex and feature_prune #25034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5345f75
to
c6c766a
Compare
...in feature_coinstatsindex and feature_pruning. Also add an assert to assert_start_raises_init_error that the node is not already running.
c6c766a
to
a3cd7db
Compare
An alternative fix would be to have |
I noticed there are other tests which don't stop the node before |
Which ones? Since I added the assert to Oh, and thanks @willcl-ark I for finding this bug! |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
self.nodes[1].assert_start_raises_init_error( | ||
expected_msg='Error: -reindex-chainstate option is not compatible with -coinstatsindex. ' | ||
'Please temporarily disable coinstatsindex while using -reindex-chainstate, or replace -reindex-chainstate with -reindex to fully rebuild all indexes.', | ||
extra_args=['-coinstatsindex', '-reindex-chainstate'], | ||
) | ||
self.restart_node(1, extra_args=["-coinstatsindex"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the default extra args are persisted in node, so no need to pass them here again.
In #24789, I forgot to stop the node before using
assert_start_raises_init_error
infeature_coinstatsindex
. This resulted in a bitcoind process that is not being terminated after the test finishes.feature_prune
has the same problem and also creates a zombie bitcoind process.Also adds an assert to
assert_start_raises_init_error
to make sure the node isn't already running to prevent this sort of mistake in the future.