mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
gossipd: call to return all connected peers.
And we report these through the getpeers JSON RPC again (carefully: in our reconnect tests we can get duplicates which this patch now filters out). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -279,9 +279,9 @@ class LightningDTests(BaseLightningDTests):
|
||||
def test_connect(self):
|
||||
l1,l2 = self.connect()
|
||||
|
||||
# Main daemon has no idea about these peers; they're in gossipd.
|
||||
assert l1.rpc.getpeer(l2.info['id'], 'info') == None
|
||||
assert l2.rpc.getpeer(l1.info['id'], 'info') == None
|
||||
# These should be in gossipd.
|
||||
assert l1.rpc.getpeer(l2.info['id'])['state'] == 'GOSSIPING'
|
||||
assert l2.rpc.getpeer(l1.info['id'])['state'] == 'GOSSIPING'
|
||||
|
||||
# Both gossipds will have them as new peers once handed back.
|
||||
l1.daemon.wait_for_log('handle_peer {}: new peer'.format(l2.info['id']))
|
||||
|
||||
Reference in New Issue
Block a user