dual-open: use tx-abort instead of warning/errors

When a channel open fails, we use tx-abort instead of warning/error.

This means that the peer won't disconnect! And instead when a new
message arrives, we'll need to rebuild the dualopend subd (if missing).

Makes opens a bit easer to retry (no reconnect needed), as well as keeps
the connection alive for other channels we may have with that peer.

Changelog-Changed: Experimental-Dual-Fund: open failures don't disconnect, but instead fail the opening process
This commit is contained in:
niftynei
2022-12-01 15:36:06 -06:00
committed by Vincenzo Palazzo
parent 96b3b40765
commit 195a2cf44b
12 changed files with 292 additions and 231 deletions

View File

@@ -742,8 +742,11 @@ def test_openchannel_hook_chaining(node_factory, bitcoind):
# the third plugin must now not be called anymore
assert not l2.daemon.is_in_log("reject on principle")
wait_for(lambda: l1.rpc.listpeers()['peers'] == [])
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
if not EXPERIMENTAL_DUAL_FUND:
wait_for(lambda: l1.rpc.listpeers()['peers'] == [])
l1.rpc.connect(l2.info['id'], 'localhost', l2.port)
else:
assert only_one(l1.rpc.listpeers()['peers'])['connected']
# 100000sat is good for hook_accepter, so it should fail 'on principle'
# at third hook openchannel_reject.py
with pytest.raises(RpcError, match=r'reject on principle'):