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.
This commit is contained in:
Valentine Wallace 2021-05-20 11:45:05 -04:00 committed by Rusty Russell
parent 76b8eb3afd
commit b2ce878c84

View File

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