From 2b4ad9b31f695f7b0ccd462a8671cadd2f09bf13 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Tue, 21 Jul 2020 20:45:38 +0200 Subject: [PATCH] paymod: Add the courtesy +1 to the CLTVs to allow for a new block This may be related to the issue #3862, however the water was muddied by it being the wrong error to return, and the node should not expect this courtesy feature to be present at all... --- plugins/libplugin-pay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libplugin-pay.c b/plugins/libplugin-pay.c index 1736a122d..adc97c817 100644 --- a/plugins/libplugin-pay.c +++ b/plugins/libplugin-pay.c @@ -1049,7 +1049,7 @@ static void payment_add_hop_onion_payload(struct payment *p, struct secret *payment_secret) { struct createonion_request *cr = p->createonion_request; - u32 cltv = p->start_block + next->delay; + u32 cltv = p->start_block + next->delay + 1; u64 msat = next->amount.millisatoshis; /* Raw: TLV payload generation*/ struct tlv_field **fields; static struct short_channel_id all_zero_scid = {.u64 = 0};