Commit 7b77a01
committed
Handle closed-chan HTLC claims in
Currently `claim_funds` does all HTLC claims in one `channel_state`
lock, ensuring that we always make claims from channels which are
open. It can thus avoid ever having to generate a
`ChannelMonitorUpdate` containing a preimage for a closed channel,
which we only do in `claim_funds_internal` (for forwarded payments).
In the next commit we'll change the locking of
`claim_funds_from_hop` so that `claim_funds` is no longer under a
single lock but takes a lock for each claim. This allows us to be
more flexible with locks going forward, and ultimately isn't a huge
change - if our counterparty intends to force-close a channel, us
choosing to ignore it by holding the `channel_state` lock for the
duration of the claim isn't going to result in a commitment update,
it will just result in the preimage already being in the
`ChannelMonitor`.claim_funds_from_hop
1 parent bffbd37 commit 7b77a01
1 file changed
+20
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4454 | 4454 | | |
4455 | 4455 | | |
4456 | 4456 | | |
4457 | | - | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
4458 | 4477 | | |
4459 | 4478 | | |
4460 | 4479 | | |
| |||
4535 | 4554 | | |
4536 | 4555 | | |
4537 | 4556 | | |
4538 | | - | |
4539 | | - | |
4540 | | - | |
4541 | | - | |
4542 | | - | |
4543 | | - | |
4544 | | - | |
4545 | | - | |
4546 | | - | |
4547 | | - | |
4548 | | - | |
4549 | | - | |
4550 | | - | |
4551 | | - | |
4552 | | - | |
4553 | | - | |
4554 | | - | |
4555 | | - | |
4556 | 4557 | | |
4557 | 4558 | | |
4558 | 4559 | | |
| |||
0 commit comments