Merge bitcoin/bitcoin#27640: test: Return dict in MiniWallet::send_to

faf4315c88 test: Return dict in MiniWallet::send_to (MarcoFalke)

Pull request description:

  Returning a tuple has many issues:

  * If only one value is needed, it can not be indexed by name
  * If another value is added to the return value, all call sites need to be updated

  Bite the bullet now and update all call sites to fix the above issues.

ACKs for top commit:
  brunoerg:
    crACK faf4315c88
  theStack:
    Code-review ACK faf4315c88
  stickies-v:
    Code review ACK faf4315c88

Tree-SHA512: 8ce1aca237df21f04b3990d0e5fcb49cc408fe6404399d3769a64eae1b5218941157d9785fce1bd9e45140cf70e06c3aa42646ee8f7b57855beb784fc3ef0261
This commit is contained in:
fanquake
2023-05-18 14:14:17 +01:00
8 changed files with 20 additions and 16 deletions

View File

@ -149,14 +149,14 @@ class CoinStatsIndexTest(BitcoinTestFramework):
self.block_sanity_check(res5['block_info'])
# Generate and send a normal tx with two outputs
tx1_txid, tx1_vout = self.wallet.send_to(
tx1 = self.wallet.send_to(
from_node=node,
scriptPubKey=self.wallet.get_scriptPubKey(),
amount=21 * COIN,
)
# Find the right position of the 21 BTC output
tx1_out_21 = self.wallet.get_utxo(txid=tx1_txid, vout=tx1_vout)
tx1_out_21 = self.wallet.get_utxo(txid=tx1["txid"], vout=tx1["sent_vout"])
# Generate and send another tx with an OP_RETURN output (which is unspendable)
tx2 = self.wallet.create_self_transfer(utxo_to_spend=tx1_out_21)['tx']