From 4dca6daf343096a564bd505e24d28f714ccb2b08 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 11 Jun 2018 13:43:30 +0200 Subject: [PATCH] opts: Bump locktime_max so we don't disagree as much with lnd I still believe that 2 weeks is way too much, but we were promised that these defaults would be slowly reduced to saner values as the stability increases. Signed-off-by: Christian Decker --- lightningd/options.c | 10 ++++++---- tests/test_lightningd.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lightningd/options.c b/lightningd/options.c index eb0575e2a..85a5561bd 100644 --- a/lightningd/options.c +++ b/lightningd/options.c @@ -477,8 +477,9 @@ static const struct config testnet_config = { /* 6 blocks to catch cheating attempts. */ .locktime_blocks = 6, - /* They can have up to 5 days. */ - .locktime_max = 5 * 6 * 24, + /* They can have up to 14 days, maximumu value that lnd will ask for by default. */ + /* FIXME Convince lnd to use more reasonable defaults... */ + .locktime_max = 14 * 6 * 24, /* We're fairly trusting, under normal circumstances. */ .anchor_confirms = 1, @@ -521,8 +522,9 @@ static const struct config mainnet_config = { /* ~one day to catch cheating attempts. */ .locktime_blocks = 6 * 24, - /* They can have up to 5 days. */ - .locktime_max = 5 * 6 * 24, + /* They can have up to 14 days, maximumu value that lnd will ask for by default. */ + /* FIXME Convince lnd to use more reasonable defaults... */ + .locktime_max = 14 * 6 * 24, /* We're fairly trusting, under normal circumstances. */ .anchor_confirms = 3, diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index edc1e6acd..5738e5f7c 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -3953,8 +3953,8 @@ class LightningDTests(BaseLightningDTests): def test_funding_fail(self): """Add some funds, fund a channel without enough funds""" # Previous runs with same bitcoind can leave funds! - l1 = self.node_factory.get_node(random_hsm=True) max_locktime = 5 * 6 * 24 + l1 = self.node_factory.get_node(random_hsm=True, options={'max-locktime-blocks': max_locktime}) l2 = self.node_factory.get_node(options={'watchtime-blocks': max_locktime + 1}) l1.rpc.connect(l2.info['id'], 'localhost', l2.port)