a10c96a63b
Having it set to nil caused https://github.com/lightningnetwork/lnd/issues/5115 The problem was several layers removed from the fix. The link decides to clean up a `fwdPkg` only if it's completed, otherwise it renotifies the HTLCs. A package is only set to complete if it's `addAck` and `settleFail` filters are full. For forwarded HTLCs, the `addAck` was never being set so it would never be considered complete under this criteria. `addAck` is set for an HTLC when signing the next commitment TX in the `LightningChannel`. The path for this is: * `LightningChannel#SettleHtlc` adds the HTLC to `localUpdates` * `LightningChannel#SignNextCommitment` builds the `ackAddRef` for all updates with `SourceRef != nil`. * `LightningChannel#SignNextCommitment` then passes the list of `ackAddRef` to `OpenChannel#AppendRemoteCommitChain` to persist the new acks in the filter Since `SourceRef` was nil for interceptor packages, `SignNextCommitment` ignored it and the ack was never persisted. |
||
---|---|---|
.. | ||
hodl | ||
hop | ||
circuit_map.go | ||
circuit_test.go | ||
circuit.go | ||
decayedlog_test.go | ||
decayedlog.go | ||
failure_detail.go | ||
failure.go | ||
htlcnotifier.go | ||
interceptable_switch.go | ||
interfaces.go | ||
link_isolated_test.go | ||
link_test.go | ||
link.go | ||
linkfailure.go | ||
log.go | ||
mailbox_test.go | ||
mailbox.go | ||
mock.go | ||
packet.go | ||
payment_result_test.go | ||
payment_result.go | ||
sequencer.go | ||
switch_test.go | ||
switch.go | ||
test_utils.go |