mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: remove (most) functions to search channels by status.
This is generally verboten now, since there can be multiple. There are a few exceptions: 1. We sometimes want to know if there are *any* active channels. 2. Some dev commands still take peer id when they mean channel_id. 3. We still allow peer id when it's fully determined. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Changed: JSON-RPC: `close` by peer id will fail if there is more than one live channel (use `channel_id` or `short_channel_id` as id arg).
This commit is contained in:
@@ -2586,7 +2586,7 @@ def test_disconnectpeer(node_factory, bitcoind):
|
||||
mine_funding_to_announce(bitcoind, [l1, l2, l3])
|
||||
|
||||
# disconnecting a non gossiping peer results in error
|
||||
with pytest.raises(RpcError, match=r'Peer is in state CHANNELD_NORMAL'):
|
||||
with pytest.raises(RpcError, match=r'Peer has \(at least one\) channel in state CHANNELD_NORMAL'):
|
||||
l1.rpc.disconnect(l3.info['id'])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user