mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
lightningd: remove almost all other peer2channel / channel2peer shims.
This final sweep only keepl peer2channel within peer_control.c for the reconnect case. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
0e93fb932a
commit
e20fff9340
@@ -3462,11 +3462,13 @@ class LightningDTests(BaseLightningDTests):
|
||||
assert len(l1.rpc.listpeers()['peers']) == 1
|
||||
|
||||
# This should fail, the funding tx is in the mempool and may confirm
|
||||
self.assertRaises(ValueError, l1.rpc.dev_forget_channel, l2.info['id'])
|
||||
self.assertRaisesRegex(ValueError,
|
||||
"Cowardly refusing to forget channel",
|
||||
l1.rpc.dev_forget_channel, l2.info['id'])
|
||||
assert len(l1.rpc.listpeers()['peers']) == 1
|
||||
|
||||
# Forcing should work
|
||||
l1.rpc.dev_forget_channel(l2.info['id'], True)
|
||||
l1.rpc.dev_forget_channel(l2.info['id'], None, True)
|
||||
assert len(l1.rpc.listpeers()['peers']) == 0
|
||||
|
||||
# And restarting should keep that peer forgotten
|
||||
|
||||
Reference in New Issue
Block a user