Generate a PaymentForwarded event when a forwarded HTLC is claimed
authorMatt Corallo <git@bluematt.me>
Fri, 16 Jul 2021 02:16:50 +0000 (02:16 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 4 Aug 2021 21:48:21 +0000 (21:48 +0000)
commit2024c5e1049ef399fb24e5c466924f980e949c69
tree827d1a6162cb145d6a142428e2a2a5ba66d8a8b5
parentf438778715dc41d95a211c16aef01cbea72e5b77
Generate a PaymentForwarded event when a forwarded HTLC is claimed

It is useful for accounting and informational reasons for users to
be informed when a payment has been successfully forwarded. Thus,
when an HTLC which represents a forwarded leg is claimed, we
generate a new `PaymentForwarded` event.

This requires some additional plumbing to return HTLC values from
`OnchainEvent`s. Further, when we have to go on-chain to claim the
inbound side of the payment, we do not inform the user of the fee
reward, as we cannot calculate it until we see what is confirmed
on-chain.

Substantial code structure rewrites by:
Valentine Wallace <vwallace@protonmail.com>
CHANGELOG.md
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
lightning/src/chain/channelmonitor.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/ln/reorg_tests.rs
lightning/src/util/events.rs