BOLT #2: * * 3. the deadline for received HTLCs this node has fulfilled: the deadline * after which the channel has to be failed and the HTLC fulfilled on-chain * before its `cltv_expiry`. See steps 4-7 above, which imply a deadline of * `2R+G+S` blocks before `cltv_expiry`: 18 blocks is reasonable. */ We approximate this, by using half the cltv_expiry_delta (3R+2G+2S), * rounded up. */
| 2869 | /* We approximate this, by using half the cltv_expiry_delta (3R+2G+2S), |
| 2870 | * rounded up. */ |
| 2871 | static u32 htlc_in_deadline(const struct lightningd *ld, |
| 2872 | const struct htlc_in *hin) |
| 2873 | { |
| 2874 | return hin->cltv_expiry - (ld->config.cltv_expiry_delta + 1)/2; |
| 2875 | } |
| 2876 | |
| 2877 | /* onchaind might fail to time out an HTLC: maybe fees spiked, or maybe |
| 2878 | * it decided it wasn't worthwhile. This risks cascading failure if |
no outgoing calls
no test coverage detected