aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-03 13:19:19 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-01-17 10:30:00 +0100
commitfa2d82103fcd3b9084edd2268443f61ca5af969c (patch)
treef3d7e32851630ee16fe2e8417c0fa25300870a7f /test/functional/test_framework
parent8339f3cea841005066239fa43e16586fdfd9d19a (diff)
test: Return wtxid from create_self_transfer_multi
This is not used right now, but may be in the future. Also, it simplifies the create_self_transfer return logic
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r--test/functional/test_framework/wallet.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/test_framework/wallet.py b/test/functional/test_framework/wallet.py
index b5de318d25..0d9e07c386 100644
--- a/test/functional/test_framework/wallet.py
+++ b/test/functional/test_framework/wallet.py
@@ -321,6 +321,7 @@ class MiniWallet:
confirmations=0,
) for i in range(len(tx.vout))],
"txid": txid,
+ "wtxid": tx.getwtxid(),
"hex": tx.serialize().hex(),
"tx": tx,
}
@@ -344,8 +345,9 @@ class MiniWallet:
tx = self.create_self_transfer_multi(utxos_to_spend=[utxo_to_spend], locktime=locktime, sequence=sequence, amount_per_output=int(COIN * send_value), target_weight=target_weight)
if not target_weight:
assert_equal(tx["tx"].get_vsize(), vsize)
+ tx["new_utxo"] = tx.pop("new_utxos")[0]
- return {"txid": tx["txid"], "wtxid": tx["tx"].getwtxid(), "hex": tx["hex"], "tx": tx["tx"], "new_utxo": tx["new_utxos"][0]}
+ return tx
def sendrawtransaction(self, *, from_node, tx_hex, maxfeerate=0, **kwargs):
txid = from_node.sendrawtransaction(hexstring=tx_hex, maxfeerate=maxfeerate, **kwargs)