@@ -98,12 +98,12 @@ func ComputeView(ourBalance, theirBalance uint64,
98
98
remoteHtlcIndex := make (map [uint64 ]lnwallet.AuxHtlcDescriptor )
99
99
100
100
for _ , entry := range original .Updates .Local {
101
- if entry .EntryType == lnwallet . Add {
101
+ if entry .IsAdd () {
102
102
localHtlcIndex [entry .HtlcIndex ] = entry
103
103
}
104
104
}
105
105
for _ , entry := range original .Updates .Remote {
106
- if entry .EntryType == lnwallet . Add {
106
+ if entry .IsAdd () {
107
107
remoteHtlcIndex [entry .HtlcIndex ] = entry
108
108
}
109
109
}
@@ -115,6 +115,9 @@ func ComputeView(ourBalance, theirBalance uint64,
115
115
case lnwallet .Add :
116
116
continue
117
117
118
+ case lnwallet .NoopAdd :
119
+ continue
120
+
118
121
// Fee updates don't concern us at the asset level.
119
122
case lnwallet .FeeUpdate :
120
123
continue
@@ -162,6 +165,9 @@ func ComputeView(ourBalance, theirBalance uint64,
162
165
case lnwallet .Add :
163
166
continue
164
167
168
+ case lnwallet .NoopAdd :
169
+ continue
170
+
165
171
// Fee updates don't concern us at the asset level.
166
172
case lnwallet .FeeUpdate :
167
173
continue
@@ -207,7 +213,7 @@ func ComputeView(ourBalance, theirBalance uint64,
207
213
// settled HTLCs, and debiting the chain state balance due to any newly
208
214
// added HTLCs.
209
215
for _ , entry := range original .Updates .Local {
210
- isAdd := entry .EntryType == lnwallet . Add
216
+ isAdd := entry .IsAdd ()
211
217
212
218
// Skip any entries that aren't adds or adds that were already
213
219
// settled or failed by a child HTLC entry we processed above.
@@ -249,7 +255,7 @@ func ComputeView(ourBalance, theirBalance uint64,
249
255
newView .OurUpdates = append (newView .OurUpdates , decodedEntry )
250
256
}
251
257
for _ , entry := range original .Updates .Remote {
252
- isAdd := entry .EntryType == lnwallet . Add
258
+ isAdd := entry .IsAdd ()
253
259
254
260
// Skip any entries that aren't adds or adds that were already
255
261
// settled or failed by a child HTLC entry we processed above.
0 commit comments