Some tests disallow to be run under --usecli. This reduces the coverage and risks that bugs in the bitcoin-cli go unnoticed.
The commits should be self-explanatory and can be reviewed and tested one-by-one.
Some tests disallow to be run under --usecli. This reduces the coverage and risks that bugs in the bitcoin-cli go unnoticed.
The commits should be self-explanatory and can be reviewed and tested one-by-one.
Re-using the same rpc connection on multiple threads is obviously
unsafe, so this helper can be used to create one connection per thread.
This refactor does not change any behavior and can be reviewed with the
git options:
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35334.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | willcl-ark |
| Concept ACK | fanquake |
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
Concept ACK
303 | @@ -301,16 +304,23 @@ def start(self, extra_args=None, *, cwd=None, stdout=None, stderr=None, env=None 304 | if self.start_perf: 305 | self._start_perf() 306 | 307 | - def create_new_rpc_connection(self): 308 | + def create_new_rpc_connection(self, *, typ="AUTO", client_timeout=None):
just personal preference but typ looks like a typo to me (even though I know it's to avoid shadowing the builtin). If you retouch (and agree) could perhaps consider mode or backend or something :)
Obviously, it was German, but I changed to mode :)
ACK fa732f0aacfae28ca6b23d9759f22f592528ad3b
Nice coverage improvement.
I agree that centralizing new per-thread/per-call RPC creation in create_new_rpc_connection() also makes things clearer overall.
Part of the diff can be reviewed with --ignore-all-space
This allows to run the test under bitcoin-cli, except for one small
part, which is skipped for now.
This also inlines rpc_url directly into create_new_rpc_connection,
because this is the only place where it is needed.
This is only used and needed in a single place.
The cli can only be called after the RPC is connected, so the cli field
should only be set after that. This is similar to the _rpc field.
This change has also other benefits:
* Manually overwriting the cli with a new rpchost is no longer needed,
so one cli-specific line can be removed from the rpc_bind.py test.
* The datadir and rpc_timeout fields are removed from the TestNodeCLI
struct. They were redundant with the -datadir and -rpcclienttimeout
command line options. Any command line option can be overwritten by
appending it with a new value, if needed.
reACK faf02674b3623c3cbaa2aec0ab02b5859d19b022
Only change was typ renamed to mode.