test: Remove from_node from create_self_transfer* MiniWallet helpers#25435
Hidden character warning
test: Remove from_node from create_self_transfer* MiniWallet helpers#25435maflcko merged 1 commit intobitcoin:masterfrom
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 |
kouloumos
left a comment
There was a problem hiding this comment.
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. |
theStack
left a comment
There was a problem hiding this comment.
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.