mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
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
This commit is contained in:
parent
8339f3cea8
commit
fa2d82103f
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue