channeldb: add more verbose docs
This commit is contained in:
1 file changed
+12
-9
+12
-9
@@ -1036,26 +1036,29 @@ type updateLog struct {
|
|||||||
logIndex uint64
|
logIndex uint64
|
||||||
|
|
||||||
// htlcCounter is a monotonically increasing integer that tracks the
|
// htlcCounter is a monotonically increasing integer that tracks the
|
||||||
// total number of offered HTLC's by the owner of this update log. We
|
// total number of offered HTLC's by the owner of this update log,
|
||||||
// use a distinct index for this purpose, as update's that remove
|
// hence the `Add` update type. We use a distinct index for this
|
||||||
// entries from the log will be indexed using this counter.
|
// purpose, as update's that remove entries from the log will be
|
||||||
|
// indexed using this counter.
|
||||||
htlcCounter uint64
|
htlcCounter uint64
|
||||||
|
|
||||||
// List is the updatelog itself, we embed this value so updateLog has
|
// List is the updatelog itself, we embed this value so updateLog has
|
||||||
// access to all the method of a list.List.
|
// access to all the method of a list.List.
|
||||||
*list.List
|
*list.List
|
||||||
|
|
||||||
// updateIndex is an index that maps a particular entries index to the
|
// updateIndex maps a `logIndex` to a particular update entry. It
|
||||||
// list element within the list.List above.
|
// deals with the four update types:
|
||||||
|
// `Fail|MalformedFail|Settle|FeeUpdate`
|
||||||
updateIndex map[uint64]*list.Element
|
updateIndex map[uint64]*list.Element
|
||||||
|
|
||||||
// offerIndex is an index that maps the counter for offered HTLC's to
|
// htlcIndex maps a `htlcCounter` to an offered HTLC entry, hence the
|
||||||
// their list element within the main list.List.
|
// `Add` update.
|
||||||
htlcIndex map[uint64]*list.Element
|
htlcIndex map[uint64]*list.Element
|
||||||
|
|
||||||
// modifiedHtlcs is a set that keeps track of all the current modified
|
// modifiedHtlcs is a set that keeps track of all the current modified
|
||||||
// htlcs. A modified HTLC is one that's present in the log, and has as
|
// htlcs, hence update types `Fail|MalformedFail|Settle`. A modified
|
||||||
// a pending fail or settle that's attempting to consume it.
|
// HTLC is one that's present in the log, and has as a pending fail or
|
||||||
|
// settle that's attempting to consume it.
|
||||||
modifiedHtlcs map[uint64]struct{}
|
modifiedHtlcs map[uint64]struct{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user