Description
As discussed in #788, the only way to manually set the remote CSV delay for channels is by using the --defaultremotedelay
flag at startup, which will be applied to all channels opened from that point on. In certain cases it is needed to manually specify this delay, in order to create channels compatible with less conservative implementations than lnd
. In particular, c-lightning tolerates a delay of maximum 3 days, while lnd
scales all the way up to 2 weeks for large channels.
While we want the defaults to be as safe as possible, it makes sense to allow the user to specify a shorter delay on a per channel basis, in the case she wants to open a channel with a node not supporting long delays. We should therefore add a flag to openchannel
that let's the user specify this, the default still being scaling linearly with channel size.
After such a flag is added, I think the --defaultremotedelay
startup option can be made applicable only to incoming channels, as you can emulate it for outgoing channels with the new flag to openchannel
(if this simplifies the code in anyway).