Fixes #25129 (subtractfeefromamount=true fails with insufficient funds)
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: contributor
-
c6122f560b
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"]
murchandamus commented at 7:06 PM on May 17, 2022:No change needed: I was today years old, when I learned that
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.
murchandamus approvedmurchandamus commented at 7:07 PM on May 17, 2022: contributortACK 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: contributorACK c6122f560b5ed57f11441d2616108b43b10721bb
achow101 commented at 11:51 PM on May 17, 2022: memberACK c6122f560b5ed57f11441d2616108b43b10721bb
achow101 merged this on May 17, 2022achow101 closed this on May 17, 2022michaelfolkson cross-referenced this on May 18, 2022 from issue wallet_taproot.py fails with "Insufficient funds (-4)" by MarcoFalkesidhujag referenced this in commit 40c71c94cd on May 28, 2022ishaanam deleted the branch on Jun 23, 2022bitcoin 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: 2026-05-19 12:53 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: 2026-05-19 12:53 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