electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 2d305bd2183ca7b67f6ad164bce3c62dbfa099b4
parent 22f6deacb81da191e0ecea22d7a1df36c4668af0
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 19 Apr 2018 09:04:03 +0200

lnbase: fix parameters to make_commitment in htlc test

Diffstat:
Mlib/tests/test_lnbase.py | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/tests/test_lnbase.py b/lib/tests/test_lnbase.py @@ -49,7 +49,8 @@ class Test_LNBase(unittest.TestCase): fee = local_feerate_per_kw * overall_weight(len(htlcs)) // 1000 local_amount = to_local_msat // 1000 - fee remote_amount = to_remote_msat // 1000 - our_commit_tx = make_commitment(commitment_number, + our_commit_tx = make_commitment( + commitment_number, local_funding_pubkey, remote_funding_pubkey, remotepubkey, local_payment_basepoint, remote_payment_basepoint, local_revocation_pubkey, local_delayedpubkey, @@ -128,12 +129,17 @@ class Test_LNBase(unittest.TestCase): htlc4_msat = 4000_000 htlcs = [(htlc2, htlc2_msat), (htlc3, htlc3_msat), (htlc0, htlc0_msat), (htlc1, htlc1_msat), (htlc4, htlc4_msat)] - our_commit_tx = make_commitment(commitment_number, + fee = local_feerate_per_kw * overall_weight(len(htlcs)) // 1000 + local_amount = to_local_msat // 1000 - fee + remote_amount = to_remote_msat // 1000 + our_commit_tx = make_commitment( + commitment_number, local_funding_pubkey, remote_funding_pubkey, remotepubkey, local_payment_basepoint, remote_payment_basepoint, local_revocation_pubkey, local_delayedpubkey, funding_tx_id, funding_output_index, funding_amount_satoshi, - to_local_msat, to_remote_msat, local_feerate_per_kw, local_delay, htlcs=htlcs) + local_amount, remote_amount, + local_delay, local_dust_limit_satoshi, htlcs=htlcs) self.sign_and_insert_remote_sig(our_commit_tx, remote_signature) self.assertEqual(str(our_commit_tx), output_commit_tx)