<p>In Lightning the <code>to_self_delay</code> parameter is influenced by your peer. When a node opens a channel to yours, they advertise the minimum they are going to accept.</p>
<p>On Core-Lightning you can set the minimum value to request from peers with the <code>watchtime-blocks</code> option. You can learn more about this option in the <code>lightningd-config</code> manpage or at the <a href="https://lightning.readthedocs.io/lightningd-config.5.html" rel="nofollow noreferrer">online documentation</a>. By <a href="https://github.com/ElementsProject/lightning/blob/5b3746172f06c235892e3b1c5fbef50b9a9d8c68/lightningd/options.c#L827-L828" rel="nofollow noreferrer">default this value is set to <code>144</code></a> (1 day).</p>
<p>The value of your own <code>to_self_delay</code> will depend on your peer. The maximum value a Core-Lightning node will accept can be modified using the <code>max-locktime-blocks</code> option (same manpage as above). By <a href="https://github.com/ElementsProject/lightning/blob/5b3746172f06c235892e3b1c5fbef50b9a9d8c68/lightningd/options.c#L830-L832" rel="nofollow noreferrer">default this value is set to <code>2016</code></a> (2 weeks).</p>
<p>Just to emphasize: the default value for the <code>our_to_self_delay</code> on Core-Lightning <em>is not</em> <code>600</code>. You must have picked this from one of your channels, where your peer requested a minimum <code>to_self_delay</code> of <code>600</code>. Since this is below the <code>2016</code> cap set by default, your Core-Lightning accepted to create a channel with this parameter.</p>

CC BY-SA 4.0
2022-12-17T19:52:48.517Z
Thank makes sense. Thank you!
Tasos Sidiropoulos
CC BY-SA 4.0
2022-12-18T08:03:07.237Z
@TasosSidiropoulos you are welcome. Feel free to mark it as accepted if that answers your question.
Antoine Poinsot
CC BY-SA 4.0
2022-12-17T19:01:44.603Z
2022-12-17T19:11:36.283Z
2022-12-17T19:11:36.283Z
Antoine Poinsot
<p>In Core-Lightning, the default value for <code>our_to_self_delay</code> is set to <code>600</code>. How do I change this value?</p>

<lightning-network><core-lightning><ln-opening-channels><ln-closing-channels>
How do I set the our_to_self_delay parameter?
Tasos Sidiropoulos
# How do I set the our_to_self_delay parameter?

(Asked by: username_0 on 2022-12-17)

In Core-Lightning, the default value for `our_to_self_delay` is set to `600`. How do I change this value?

**Tags:** lightning-network, core-lightning, ln-opening-channels, ln-closing-channels


---

## 1 answers

### Answer by username_1 on 2022-12-17. Score: 4 | Accepted answer

In Lightning the `to_self_delay` parameter is influenced by your peer. When a node opens a channel to yours, they advertise the minimum they are going to accept.

On Core-Lightning you can set the minimum value to request from peers with the `watchtime-blocks` option. You can learn more about this option in the `lightningd-config` manpage or at the [online documentation](https://lightning.readthedocs.io/lightningd-config.5.html). By [default this value is set to `144`](https://github.com/ElementsProject/lightning/blob/5b3746172f06c235892e3b1c5fbef50b9a9d8c68/lightningd/options.c#L827-L828) (1 day).

The value of your own `to_self_delay` will depend on your peer. The maximum value a Core-Lightning node will accept can be modified using the `max-locktime-blocks` option (same manpage as above). By [default this value is set to `2016`](https://github.com/ElementsProject/lightning/blob/5b3746172f06c235892e3b1c5fbef50b9a9d8c68/lightningd/options.c#L830-L832) (2 weeks).

Just to emphasize: the default value for the `our_to_self_delay` on Core-Lightning *is not* `600`. You must have picked this from one of your channels, where your peer requested a minimum `to_self_delay` of `600`. Since this is below the `2016` cap set by default, your Core-Lightning accepted to create a channel with this parameter.

> **Comments:**
> **username_0**: Thank makes sense. Thank you!  
> **username_1**: @username_0 you are welcome. Feel free to mark it as accepted if that answers your question.  

---

