test: Remove from_node from create_self_transfer* MiniWallet helpers #25435
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2206-test-miniwallet-no-node-🎳 changing 8 files +20 −22-
MarcoFalke commented at 10:03 am on June 21, 2022: memberMiniWallet is capable to create a transaction without a node, so don’t pass it in where not needed.
-
test: Remove from_node from create_self_transfer* MiniWallet helpers
The from_node argument is no longer used as of commit a55606c3bdbfdf660b093bc2a618d537ffae7f26
-
fanquake added the label Tests on Jun 21, 2022
-
kouloumos commented at 10:39 am on June 21, 2022: member
Could this be an opportunity to further reassess the use of the
from_node
argument?Out of the 81 times that is passed as an argument to
send_self_transfer
,send_to
,send_self_transfer_multi
andsendrawtransaction
only at 9 occurances it uses a node other than the MiniWallet test_node.As that argument is passed down to
sendrawtransaction
, maybe it could be further simplified by changingfrom_node=None
at the rest of the methods and addfrom_node = from_node or self._test_node
insendrawtransaction
-
MarcoFalke commented at 10:48 am on June 21, 2022: memberSure, but let’s create a separate discussion thread for this, see also https://github.com/bitcoin/bitcoin/pull/24025
-
kouloumos commented at 1:02 pm on June 21, 2022: member
ACK fa8421bc5bcd483a9501257073db17ff2e76eb46
In order to remove
from_node
fromcreate_self_transfer*
, this PR also changes the method signature ofsend_self_transfer*
to explicitly accept thefrom_node
argument as it cannot access it anymore throughkwargs
.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.
-
MarcoFalke commented at 1:19 pm on June 21, 2022: memberI 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?
-
kouloumos commented at 3:12 pm on June 21, 2022: member
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 approved
-
theStack commented at 11:34 pm on June 21, 2022: member
ACK fa8421bc5bcd483a9501257073db17ff2e76eb46
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. -
MarcoFalke merged this on Jun 22, 2022
-
MarcoFalke closed this on Jun 22, 2022
-
MarcoFalke deleted the branch on Jun 22, 2022
-
sidhujag referenced this in commit 317d05d58a on Jun 22, 2022
-
theStack referenced this in commit f665c6ecda on Jun 27, 2022
-
MarcoFalke referenced this in commit 78957e71e8 on Jun 28, 2022
-
sidhujag referenced this in commit 0a8855a30e on Jun 28, 2022
-
DrahtBot locked this on Jun 22, 2023
Labels
Tests
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-23 15:12 UTC
More mirrored repositories can be found on mirror.b10c.me