1
0

transaction.py: shortcut witness/scriptSig serialisation

This commit is contained in:
SomberNight
2018-04-18 19:00:14 +02:00
committed by ThomasV
parent d055507003
commit 22f6deacb8
2 changed files with 10 additions and 8 deletions

View File

@@ -166,14 +166,15 @@ class Test_LNBase(unittest.TestCase):
payment_preimage=htlc0_payment_preimage,
revocationpubkey=local_revocation_pubkey,
local_delayedpubkey=local_delayedpubkey,
amount_msat=htlc0_msat)
amount_msat=htlc0_msat,
witness_script=ref_htlc0_wscript)
self.assertTrue(Transaction.is_txin_complete(our_htlc0_tx_inputs[0]))
self.assertEqual(bfh("050047"), bfh(Transaction.serialize_witness(our_htlc0_tx_inputs[0]))[:3])
our_htlc0_tx = make_htlc_tx(0,
inputs=out_htlc0_tx_inputs,
inputs=our_htlc0_tx_inputs,
output=our_htlc0_tx_output)
self.assertEqual(str(our_htlc0_tx), output_htlc_success_tx_0)