Commit c2a7e16
committed
Place htlc index data in funding scopes, and the rest in channel monitor
This commit introduces a per-commitment id for each HTLC, which allows
channel monitor to map the HTLC indices in a funding scope to all the
HTLCs it knows about for a particular commitment.
This is an arbitrary identifier that has no relationship with the
`id` field from `update_add_htlc`.
For now, this per-commitment id is set by monitor, as the `htlc_outputs`
field of `LatestCounterpartyCommitmentTXInfo` holds information on
which HTLCs were assigned which index, if any.
Splicing and custom transactions will replace
`LatestCounterpartyCommitmentTXInfo` with
`LatestCounterpartyCommitmentTXS`. When the switch is made, the
per-commitment id of each HTLC for a commitment will be set by channel.
Channel will give these ids to transactions builders, and these will in
turn place the non-dust HTLC index information in each
`CommitmentTransaction`.
This commit makes no changes to the serialization of channel monitor,
we leave this for a follow-up.1 parent ebdbee0 commit c2a7e16
2 files changed
+185
-67
lines changed
0 commit comments