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>
This commit is contained in:
Christian Decker
2018-06-11 13:43:30 +02:00
committed by Rusty Russell
parent 8183590cdb
commit 4dca6daf34
2 changed files with 7 additions and 5 deletions

View File

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

View File

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