test: use sendall
in wallet_taproot.py tests
#25159
pull
ishaanam
wants to merge
1
commits into
bitcoin:master
from
ishaanam:wallet_taproot_sendall_fix
changing
1
files
+2 −2
-
ishaanam commented at 5:52 pm on May 17, 2022: memberFixes #25129 (subtractfeefromamount=true fails with insufficient funds)
-
test: use sendall in wallet_taproot.py tests
Fixes #25129 (subtractfeefromamount=true fails with insufficient funds)
-
fanquake added the label Tests on May 17, 2022
-
in test/functional/wallet_taproot.py:448 in c6122f560b
445+ txid = self.rpc_online.sendall(recipients=[self.boring.getnewaddress()])["txid"] 446 self.generatetoaddress(self.nodes[0], 1, self.boring.getnewaddress(), sync_fun=self.no_op) 447 assert(self.rpc_online.gettransaction(txid)["confirmations"] > 0) 448 449- psbt = self.psbt_online.walletcreatefundedpsbt([], [{self.boring.getnewaddress(): self.psbt_online.getbalance()}], None, {"subtractFeeFromOutputs": [0]})['psbt'] 450+ psbt = self.psbt_online.sendall(recipients=[self.boring.getnewaddress()], options={"psbt": True})["psbt"]
Xekyo commented at 7:06 pm on May 17, 2022:No change needed: I was today years old, when I learned that
0 psbt = self.psbt_online.sendall(recipients=[self.boring.getnewaddress()])["psbt"]
would also work, because the wallet automatically returns a PSBT when it cannot sign for a transaction. I do prefer it explicitly stated as proposed by @ishaanam, though.
Xekyo approvedXekyo commented at 7:07 pm on May 17, 2022: membertACK c6122f560b5ed57f11441d2616108b43b10721bb
Nice, that was a quick turn around. I played around a bit with the change and think that this should remedy the occasional test failure in
/test/functional/wallet_taproot.py
.brunoerg approvedbrunoerg commented at 7:25 pm on May 17, 2022: memberACK c6122f560b5ed57f11441d2616108b43b10721bbachow101 commented at 11:51 pm on May 17, 2022: memberACK c6122f560b5ed57f11441d2616108b43b10721bbachow101 merged this on May 17, 2022achow101 closed this on May 17, 2022
sidhujag referenced this in commit 40c71c94cd on May 28, 2022ishaanam deleted the branch on Jun 23, 2022DrahtBot locked this on Jun 23, 2023
github-metadata-mirror
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-11-21 18:12 UTC
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-11-21 18:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me