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...
This commit is contained in:
Christian Decker 2020-07-21 20:45:38 +02:00 committed by Rusty Russell
parent e92787a0e2
commit d289ee64a1

View file

@ -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};