Browse Source

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 <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
committed by Rusty Russell
parent
commit
4dca6daf34
  1. 10
      lightningd/options.c
  2. 2
      tests/test_lightningd.py

10
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,

2
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)

Loading…
Cancel
Save