lnwallet/channel: use remote dustlimit when generating HTLC sigs

This commit fixes an issue which would arise in some cases when the
local and remote dust limits would differ, resulting in lnd not
producing the expected number of HTLC signatures. This was a result of
checking dust against the local instead of the remote dust limit.

A test exercising the scenario is added.
This commit is contained in:
Johan T. Halseth committed 2018-03-22 14:58:22 +01:00
1 parent 263d6b9c1f
commit 70b86e596e
2 files changed
+48 -1

No files matched your search

+1 -1
View File
@@ -2540,7 +2540,7 @@ func genRemoteHtlcSigJobs(keyRing *CommitmentKeyRing,
remoteCommitView *commitment) ([]signJob, chan struct{}, error) {
txHash := remoteCommitView.txn.TxHash()
dustLimit := localChanCfg.DustLimit
dustLimit := remoteChanCfg.DustLimit
feePerKw := remoteCommitView.feePerKw
// With the keys generated, we'll make a slice with enough capacity to