test: remove ToHex helper, use .serialize().hex() instead

This commit is contained in:
Sebastian Falbesoner
2021-06-16 00:32:18 +02:00
parent 2ce7b47958
commit a79396fe5f
17 changed files with 128 additions and 102 deletions

View File

@ -23,7 +23,6 @@ from .messages import (
CTxIn,
CTxInWitness,
CTxOut,
ToHex,
hash256,
hex_str_to_bytes,
ser_uint256,
@ -250,7 +249,7 @@ def send_to_witness(use_p2wsh, node, utxo, pubkey, encode_p2sh, amount, sign=Tru
if (insert_redeem_script):
tx = tx_from_hex(tx_to_witness)
tx.vin[0].scriptSig += CScript([hex_str_to_bytes(insert_redeem_script)])
tx_to_witness = ToHex(tx)
tx_to_witness = tx.serialize().hex()
return node.sendrawtransaction(tx_to_witness)