Commit ccf8d44
committed
Correct confirmation target constant definitions
`CLTV_CLAIM_BUFFER`'s definition stated "this is an upper bound on
how many blocks we think it can take us to get a transaction
confirmed". This was mostly okay for pre-anchor channels, where we
broadcasted HTLC claim transactions at the same time as the
commitment transactions themselves, but for anchor channels we can
no longer do that - HTLC transactions are always CSV 1'd.
Further, when we do go to broadcast HTLC transactions, we start
the feerate estimate for them back at the users' feerate estimator,
rather than whatever feerate we ended up using to get the
commitment transaction confirmed. While we should maybe consider
changing that, for now that means that we really need to run the
whole "get a transaction confirmed" process from start to finish
*twice* in order to claim an HTLC.
Thus, `CLTV_CLAIM_BUFFER` is here redefined to be two times "the
upper bound on how many blocks we think it can take for us to get
a transaction confirmed", with a new `MAX_BLOCKS_FOR_CONF` constant
defining the expected max blocks.1 parent ac74d96 commit ccf8d44
2 files changed
+10
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
231 | 234 | | |
232 | 235 | | |
233 | | - | |
234 | | - | |
235 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
2855 | 2855 | | |
2856 | 2856 | | |
2857 | 2857 | | |
2858 | | - | |
| 2858 | + | |
2859 | 2859 | | |
2860 | 2860 | | |
2861 | 2861 | | |
2862 | 2862 | | |
2863 | | - | |
| 2863 | + | |
2864 | 2864 | | |
2865 | 2865 | | |
2866 | 2866 | | |
| |||
0 commit comments