Skip to content

Commit

Permalink
test: make sure MiniWallet().sendrawtransaction() returns txid
Browse files Browse the repository at this point in the history
Courtesy of f680d27 from bitcoin#22998
  • Loading branch information
kwvg committed Jan 4, 2025
1 parent 24eb44c commit 473620f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/functional/test_framework/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ def create_self_transfer(self, *, fee_rate=Decimal("0.003"), from_node, utxo_to_
return {'txid': tx_info['txid'], 'hex': tx_hex, 'tx': tx}

def sendrawtransaction(self, *, from_node, tx_hex):
from_node.sendrawtransaction(tx_hex)
txid = from_node.sendrawtransaction(tx_hex)
self.scan_tx(from_node.decoderawtransaction(tx_hex))
return txid


def make_chain(node, address, privkeys, parent_txid, parent_value, n=0, parent_locking_script=None, fee=DEFAULT_FEE):
"""Build a transaction that spends parent_txid.vout[n] and produces one output with
Expand Down

0 comments on commit 473620f

Please sign in to comment.