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
  1. ishaanam commented at 5:52 pm on May 17, 2022: member
    Fixes #25129 (subtractfeefromamount=true fails with insufficient funds)
  2. test: use sendall in wallet_taproot.py tests
    Fixes #25129 (subtractfeefromamount=true fails with insufficient
    funds)
    c6122f560b
  3. fanquake added the label Tests on May 17, 2022
  4. 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.

  5. Xekyo approved
  6. Xekyo commented at 7:07 pm on May 17, 2022: member

    tACK 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.

  7. brunoerg approved
  8. brunoerg commented at 7:25 pm on May 17, 2022: member
    ACK c6122f560b5ed57f11441d2616108b43b10721bb
  9. achow101 commented at 11:51 pm on May 17, 2022: member
    ACK c6122f560b5ed57f11441d2616108b43b10721bb
  10. achow101 merged this on May 17, 2022
  11. achow101 closed this on May 17, 2022

  12. sidhujag referenced this in commit 40c71c94cd on May 28, 2022
  13. ishaanam deleted the branch on Jun 23, 2022
  14. DrahtBot 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 site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me