6886a0117f
One of the first things the incoming contest resolver does is checking if the preimage is available and if it is, convert itself into a success resolver. This behaviour makes it unnecessary to already determine earlier in the process whether an incoming contest or a success resolver is needed. By having all incoming htlcs go through the incoming contest resolver, the number of execution paths is reduced and it becomes easier to ascertain that the implemented logic is correct. The only functional change in this commit is that a forwarded htlc for which is the preimage is known, is no longer settled when the htlc is already expired. Previously a success resolver would be instantiated directly, skipping the expiry height check. This created a risk that the success resolver would never finish, because an expired htlc could already have been swept by the remote party and there is no detection of this remote spend in the success resolver currently. With the new change, the general direction that an expired htlc shouldn't be settled and instead given up on is implemented more consistently. This commit prepares for fixing edges cases related to hodl invoice on-chain resolution. |
||
---|---|---|
.. | ||
briefcase_test.go | ||
briefcase.go | ||
chain_arbitrator_test.go | ||
chain_arbitrator.go | ||
chain_watcher_test.go | ||
chain_watcher.go | ||
channel_arbitrator_test.go | ||
channel_arbitrator.go | ||
commit_sweep_resolver.go | ||
contract_resolvers.go | ||
htlc_incoming_contest_resolver.go | ||
htlc_outgoing_contest_resolver.go | ||
htlc_success_resolver.go | ||
htlc_timeout_resolver_test.go | ||
htlc_timeout_resolver.go | ||
log.go |