lnwallet: export the HtlcView struct
We'll need this later on to ensure we can always interact with the new aux blobs at all stages of commitment transaction construction.
This commit is contained in:
1 parent
5c4428c3cf
commit
12352d9e6e
3 files changed
+102
-69
No files matched your search
@@ -685,7 +685,7 @@ type unsignedCommitmentTx struct {
|
||||
func (cb *CommitmentBuilder) createUnsignedCommitmentTx(ourBalance,
|
||||
theirBalance lnwire.MilliSatoshi, whoseCommit lntypes.ChannelParty,
|
||||
feePerKw chainfee.SatPerKWeight, height uint64,
|
||||
filteredHTLCView *htlcView,
|
||||
filteredHTLCView *HtlcView,
|
||||
keyRing *CommitmentKeyRing) (*unsignedCommitmentTx, error) {
|
||||
|
||||
dustLimit := cb.chanState.LocalChanCfg.DustLimit
|
||||
@@ -694,7 +694,7 @@ func (cb *CommitmentBuilder) createUnsignedCommitmentTx(ourBalance,
|
||||
}
|
||||
|
||||
numHTLCs := int64(0)
|
||||
for _, htlc := range filteredHTLCView.ourUpdates {
|
||||
for _, htlc := range filteredHTLCView.OurUpdates {
|
||||
if HtlcIsDust(
|
||||
cb.chanState.ChanType, false, whoseCommit, feePerKw,
|
||||
htlc.Amount.ToSatoshis(), dustLimit,
|
||||
@@ -705,7 +705,7 @@ func (cb *CommitmentBuilder) createUnsignedCommitmentTx(ourBalance,
|
||||
|
||||
numHTLCs++
|
||||
}
|
||||
for _, htlc := range filteredHTLCView.theirUpdates {
|
||||
for _, htlc := range filteredHTLCView.TheirUpdates {
|
||||
if HtlcIsDust(
|
||||
cb.chanState.ChanType, true, whoseCommit, feePerKw,
|
||||
htlc.Amount.ToSatoshis(), dustLimit,
|
||||
@@ -789,7 +789,7 @@ func (cb *CommitmentBuilder) createUnsignedCommitmentTx(ourBalance,
|
||||
// commitment outputs and should correspond to zero values for the
|
||||
// purposes of sorting.
|
||||
cltvs := make([]uint32, len(commitTx.TxOut))
|
||||
for _, htlc := range filteredHTLCView.ourUpdates {
|
||||
for _, htlc := range filteredHTLCView.OurUpdates {
|
||||
if HtlcIsDust(
|
||||
cb.chanState.ChanType, false, whoseCommit, feePerKw,
|
||||
htlc.Amount.ToSatoshis(), dustLimit,
|
||||
@@ -807,7 +807,7 @@ func (cb *CommitmentBuilder) createUnsignedCommitmentTx(ourBalance,
|
||||
}
|
||||
cltvs = append(cltvs, htlc.Timeout) // nolint:makezero
|
||||
}
|
||||
for _, htlc := range filteredHTLCView.theirUpdates {
|
||||
for _, htlc := range filteredHTLCView.TheirUpdates {
|
||||
if HtlcIsDust(
|
||||
cb.chanState.ChanType, true, whoseCommit, feePerKw,
|
||||
htlc.Amount.ToSatoshis(), dustLimit,
|
||||
|
||||
Reference in new issue
Block a user