1
0

lnbase: test signing of first htlc test case

This commit is contained in:
Janus
2018-04-17 09:55:27 +02:00
committed by ThomasV
parent fa86dda983
commit 4b8f279d50
2 changed files with 20 additions and 3 deletions

View File

@@ -331,7 +331,9 @@ def make_commitment(ctn, local_funding_pubkey, remote_funding_pubkey, remotepubk
to_local = (bitcoin.TYPE_ADDRESS, local_address, local_amount)
to_remote = (bitcoin.TYPE_ADDRESS, remote_address, remote_amount)
# no htlc for the moment
c_outputs = [to_local, to_remote] + htlcs
c_outputs = [to_local, to_remote]
for script, msat_amount in htlcs:
c_outputs += [(bitcoin.TYPE_ADDRESS, bitcoin.redeem_script_to_address('p2wsh', bh2u(script)), msat_amount // 1000)]
# create commitment tx
tx = Transaction.from_io(c_inputs, c_outputs, locktime=locktime, version=2)
tx.BIP_LI01_sort()