From b2ce878c84e486d45e873e55c36a4be5b46aeb42 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Thu, 20 May 2021 11:45:05 -0400 Subject: [PATCH] keysend plugin: make cltv_expiry for keysends slightly more conservative This makes the min_cltv_expiry_delta equal to Rust-Lightning's, which is the highest minimum we know of. Changelog-Changed: keysend now uses 22 for the final CTLV, making it rust-lightning compatible. --- plugins/keysend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/keysend.c b/plugins/keysend.c index 97196a3a5..dfa27861c 100644 --- a/plugins/keysend.c +++ b/plugins/keysend.c @@ -163,7 +163,8 @@ static struct command_result *json_keysend(struct command *cmd, const char *buf, p->payment_secret = NULL; p->amount = *msat; p->routes = NULL; - p->min_final_cltv_expiry = DEFAULT_FINAL_CLTV_DELTA; + // 22 is the Rust-Lightning default and the highest minimum we know of. + p->min_final_cltv_expiry = 22; p->features = NULL; p->invstring = NULL; p->why = "Initial attempt";