refactor: Use create_new_rpc_connection in wallet_multiwallet.py
What changed, and why it matters
This is a minor code cleanup in a test file. It replaces a manual way of creating a connection to the Bitcoin node with a helper method that does the same thing. There is no security issue here.
No action needed. This is a benign refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit refactors test/functional/wallet_multiwallet.py to use node.create_new_rpc_connection() instead of manually constructing either node.cli or get_rpc_proxy(node.url, 1, timeout=600, coveragedir=node.coverage_dir). This is a test-only refactor with no functional or security behavior change.
Changed components
test/functional/wallet_multiwallet.pyInspect captured patch +1 / −2
diff --git a/test/functional/wallet_multiwallet.py b/test/functional/wallet_multiwallet.py
index 6240126c..4f855ee0 100755
--- a/test/functional/wallet_multiwallet.py
+++ b/test/functional/wallet_multiwallet.py
@@ -20,7 +20,6 @@ from test_framework.util import (
assert_equal,
assert_raises_rpc_error,
ensure_for,
- get_rpc_proxy,
)
got_loading_error = False
@@ -328,7 +327,7 @@ class MultiWalletTest(BitcoinTestFramework):
self.log.info("Concurrent wallet loading")
threads = []
for _ in range(3):
- n = node.cli if self.options.usecli else get_rpc_proxy(node.url, 1, timeout=600, coveragedir=node.coverage_dir)
+ n = node.create_new_rpc_connection()
t = Thread(target=test_load_unload, args=(n, wallet_names[2]))
t.start()
threads.append(t)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.