Commit 2e80fbd
committed
Set correct
If the counterparty broadcasts a revoked transaction with offered
HTLCs, the output is not immediately pinnable as the counterparty
cannot claim the HTLC until the CLTV expires and they use an
HTLC-Timeout path.
Here we fix the `counterparty_spendable_height` value we set on
counterparty revoked HTLC claims to match reality. Note that
because we still consider these outputs `Pinnable` the value is
not used. In the next commit we'll start making them `Unpinnable`
which will actually change behavior.
Note that when upgrading we have to wipe the
`counterparty_spendable_height` value for non-offered HTLCs as
otherwise we'd consider them `Unpinnable` when they are, in fact,
`Pinnable`.counterparty_spendable_height on c.p. revoked HTLCs1 parent 58a7b79 commit 2e80fbd
2 files changed
+24
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3564 | 3564 | | |
3565 | 3565 | | |
3566 | 3566 | | |
| 3567 | + | |
| 3568 | + | |
| 3569 | + | |
| 3570 | + | |
| 3571 | + | |
3567 | 3572 | | |
3568 | 3573 | | |
3569 | 3574 | | |
3570 | 3575 | | |
3571 | | - | |
| 3576 | + | |
3572 | 3577 | | |
3573 | 3578 | | |
3574 | 3579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
778 | 780 | | |
779 | 781 | | |
780 | 782 | | |
| |||
1218 | 1220 | | |
1219 | 1221 | | |
1220 | 1222 | | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
1221 | 1235 | | |
1222 | 1236 | | |
1223 | 1237 | | |
| |||
0 commit comments