common: remove peer_failed in favor of peer_failed_warn/peer_failed_err

And make all the callers choose which one.  In general, I prefer warn,
which lets them reconnect and try again, however some places are either
stated that they must be errors in the spec itself, or in openingd
where we abandon the channel when we close the connection anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Changed: Protocol: we now send warning messages and close the connection, except on unrecoverable errors.
This commit is contained in:
Rusty Russell
2021-02-02 23:19:01 +10:30
parent e6cefc4b00
commit f4ee41a989
9 changed files with 581 additions and 573 deletions

View File

@@ -263,7 +263,8 @@ def test_pay_disconnect(node_factory, bitcoind):
# Wait for l1 notice
l1.daemon.wait_for_log(r'Peer transient failure in CHANNELD_NORMAL: channeld: .*: update_fee \d+ outside range 1875-75000')
# l2 fails hard.
# Make l2 fail hard.
l2.rpc.close(l1.info['id'], unilateraltimeout=1)
l2.daemon.wait_for_log('sendrawtx exit')
bitcoind.generate_block(1, wait_for_mempool=1)
sync_blockheight(bitcoind, [l1, l2])