@@ -99,7 +99,7 @@ type updateType uint8
99
99
100
100
const (
101
101
// Add is an update type that adds a new HTLC entry into the log.
102
- // Either side can add a new penidng HTLC by adding a new Add entry
102
+ // Either side can add a new pending HTLC by adding a new Add entry
103
103
// into their update log.
104
104
Add updateType = iota
105
105
@@ -150,15 +150,6 @@ type PaymentDescriptor struct {
150
150
// settles or times out.
151
151
ParentIndex uint64
152
152
153
- // Payload is an opaque blob which is used to complete multi-hop
154
- // routing.
155
- Payload []byte
156
-
157
- // EntryType denotes the exact type of the PaymentDescriptor. In the
158
- // case of a Timeout, or Settle type, then the Parent field will point
159
- // into the log to the HTLC being modified.
160
- EntryType updateType
161
-
162
153
// addCommitHeight[Remote|Local] encodes the height of the commitment
163
154
// which included this HTLC on either the remote or local commitment
164
155
// chain. This value is used to determine when an HTLC is fully
@@ -174,24 +165,36 @@ type PaymentDescriptor struct {
174
165
removeCommitHeightRemote uint64
175
166
removeCommitHeightLocal uint64
176
167
177
- // isForwarded denotes if an incoming HTLC has been forwarded to any
178
- // possible upstream peers in the route.
179
- isForwarded bool
168
+ // Payload is an opaque blob which is used to complete multi-hop
169
+ // routing.
170
+ Payload []byte
171
+
172
+ // [our|their|]PkScript are the raw public key scripts that encodes the
173
+ // redemption rules for this particular HTLC. These fields will only be
174
+ // populated iff the EntryType of this PaymentDescriptor is Add.
175
+ // ourPkScript is the ourPkScript from the context of our local
176
+ // commitment chain. theirPkScript is the latest pkScript from the
177
+ // context of the remote commitment chain.
178
+ //
179
+ // NOTE: These values may change within the logs themselves, however,
180
+ // they'll stay consistent within the commitment chain entries
181
+ // themselves.
182
+ ourPkScript []byte
183
+ theirPkScript []byte
180
184
181
- // [our|their|theirPrev]PkScript are the raw public key scripts that
182
- // encodes the redemption rules for this particular HTLC. These fields
183
- // will only be populated iff the EntryType of this PaymentDescriptor
184
- // is Add. ourPkScript is the ourPkScript from the context of our local
185
- // commitment chain. [their|theirPrev]PkScript are the two latest
186
- // pkScripts from the context of the remote commitment chain.
187
- ourPkScript []byte
188
- theirPkScript []byte
189
- theirPrevPkScript []byte
185
+ // EntryType denotes the exact type of the PaymentDescriptor. In the
186
+ // case of a Timeout, or Settle type, then the Parent field will point
187
+ // into the log to the HTLC being modified.
188
+ EntryType updateType
190
189
191
190
// isDust[Local|Remote] denotes if this HTLC is below the dust limit in
192
191
// locally or remotely.
193
192
isDustLocal bool
194
193
isDustRemote bool
194
+
195
+ // isForwarded denotes if an incoming HTLC has been forwarded to any
196
+ // possible upstream peers in the route.
197
+ isForwarded bool
195
198
}
196
199
197
200
// commitment represents a commitment to a new state within an active channel.
0 commit comments