channeld: defer first update_fee until we have an HTLC to send.

Sending update_fee immediately after channel establishment seems to
upset LND, so work around it by deferring it.  The reason we increase
the fee after establishment is because now we might need to close the
channel in a hurry due to htlcs, but until there are htlcs that's
unnecessary.

Fixes: #3596
Changelog-Changed: Added workaround for lnd rejecting our commitment_signed when we send an update_fee after channel confirmed.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-04-09 14:30:06 +09:30
committed by neil saitug
parent 197a144505
commit bf2a42ada5
3 changed files with 26 additions and 5 deletions

View File

@@ -228,6 +228,9 @@ def test_pay_disconnect(node_factory, bitcoind):
l1, l2 = node_factory.line_graph(2, opts={'dev-max-fee-multiplier': 5,
'may_reconnect': True})
# Dummy payment to kick off update_fee messages
l1.pay(l2, 1000)
inv = l2.rpc.invoice(123000, 'test_pay_disconnect', 'description')
rhash = inv['payment_hash']