-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
test: Remove from_node from create_self_transfer* MiniWallet helpers #25435
The head ref may contain hidden characters: "2206-test-miniwallet-no-node-\u{1F3B3}"
test: Remove from_node from create_self_transfer* MiniWallet helpers #25435
Conversation
The from_node argument is no longer used as of commit a55606c
Could this be an opportunity to further reassess the use of the Out of the 81 times that is passed as an argument to As that argument is passed down to |
Sure, but let's create a separate discussion thread for this, see also #24025 |
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.
Concept ACK 🔎
The from_node
argument was used for testing mempool validity (via the testmempoolaccept
RPC), which was removed in #25356 and is hence not needed anymore.
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.
ACK fa8421b
In order to remove from_node
from create_self_transfer*
, this PR also changes the method signature of send_self_transfer*
to explicitly accept the from_node
argument as it cannot access it anymore through kwargs
.
Sure, but let's create a separate discussion thread for this, see also #24025
Thanks for the input, I was not aware that this issue was already raised as I initially though of it as less controversial.
I think it can be done by explicitly passing a default_send_node to MiniWallet, with the disclaimer that it should only be used where no ambiguity exists. For example, for tests that only have one node? |
Per your suggestion, I replied on the PR you mentioned, as a more suitable discussion thread. |
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.
ACK fa8421b
I think it can be done by explicitly passing a default_send_node to MiniWallet, with the disclaimer that it should only be used where no ambiguity exists. For example, for tests that only have one node?
Sounds like a good idea to me. If anyone opens a follow-up PR implementing this or any other way to reduce the need to pass explicit from_node
arguments (now discussed in #24025), feel free to ping me as reviewer.
The `from_node` argument doesn't exist anymore for `MiniWallet.create_self_transfer` since PR bitcoin#25435 (commit fa8421b).
….py` f665c6e test: fix failing test interface_usdt_utxocache.py (Sebastian Falbesoner) Pull request description: The `from_node` argument doesn't exist anymore for `MiniWallet.create_self_transfer` since PR bitcoin#25435 (commit fa8421b), leading to an error on master: ``` $ sudo ./test/functional/interface_usdt_utxocache.py 2022-06-27T17:45:35.585000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_7s1djjo1 2022-06-27T17:45:36.515000Z TestFramework (INFO): testing the utxocache:uncache tracepoint API 2022-06-27T17:45:36.517000Z TestFramework (ERROR): Unexpected exception caught during testing Traceback (most recent call last): File "/home/honeybadger/bitcoin/test/functional/test_framework/test_framework.py", line 133, in main self.run_test() File "/home/honeybadger/bitcoin/./test/functional/interface_usdt_utxocache.py", line 149, in run_test self.test_uncache() File "/home/honeybadger/bitcoin/./test/functional/interface_usdt_utxocache.py", line 172, in test_uncache invalid_tx = self.wallet.create_self_transfer( TypeError: create_self_transfer() got an unexpected keyword argument 'from_node' 2022-06-27T17:45:36.568000Z TestFramework (INFO): Stopping nodes [...] ``` Fix this by removing the argument. (Unfortunately, the USDT tests don't seem to run on any CI target, I guess that's due to missing permissions to hook into the kernel.) ACKs for top commit: MarcoFalke: cr ACK f665c6e Tree-SHA512: 74f8e398739a25ab5518ff71b998d03d4e529a786ba5b424509de81a511ad3e2e1cd38a5b7bb9f1f5a21340391d6807f4951ff39fa3a2ad65a3b11b989eebea6
….py` f665c6e test: fix failing test interface_usdt_utxocache.py (Sebastian Falbesoner) Pull request description: The `from_node` argument doesn't exist anymore for `MiniWallet.create_self_transfer` since PR bitcoin#25435 (commit fa8421b), leading to an error on master: ``` $ sudo ./test/functional/interface_usdt_utxocache.py 2022-06-27T17:45:35.585000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_7s1djjo1 2022-06-27T17:45:36.515000Z TestFramework (INFO): testing the utxocache:uncache tracepoint API 2022-06-27T17:45:36.517000Z TestFramework (ERROR): Unexpected exception caught during testing Traceback (most recent call last): File "/home/honeybadger/bitcoin/test/functional/test_framework/test_framework.py", line 133, in main self.run_test() File "/home/honeybadger/bitcoin/./test/functional/interface_usdt_utxocache.py", line 149, in run_test self.test_uncache() File "/home/honeybadger/bitcoin/./test/functional/interface_usdt_utxocache.py", line 172, in test_uncache invalid_tx = self.wallet.create_self_transfer( TypeError: create_self_transfer() got an unexpected keyword argument 'from_node' 2022-06-27T17:45:36.568000Z TestFramework (INFO): Stopping nodes [...] ``` Fix this by removing the argument. (Unfortunately, the USDT tests don't seem to run on any CI target, I guess that's due to missing permissions to hook into the kernel.) ACKs for top commit: MarcoFalke: cr ACK f665c6e Tree-SHA512: 74f8e398739a25ab5518ff71b998d03d4e529a786ba5b424509de81a511ad3e2e1cd38a5b7bb9f1f5a21340391d6807f4951ff39fa3a2ad65a3b11b989eebea6
MiniWallet is capable to create a transaction without a node, so don't pass it in where not needed.