listpeers: expose peer features as 'local_features' and 'global_features'

For now, just the connected peers.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-06-22 09:23:57 +09:30
committed by Christian Decker
parent 7b735fbeee
commit 9fa738a741
5 changed files with 47 additions and 4 deletions

View File

@@ -426,6 +426,12 @@ class LightningDTests(BaseLightningDTests):
.format(l1.daemon.lightning_dir, leaks))
l1.rpc.stop()
def test_features(self):
l1, l2 = self.connect()
# LOCAL_INITIAL_ROUTING_SYNC + LOCAL_GOSSIP_QUERIES
assert l1.rpc.listpeers()['peers'][0]['local_features'] == '88'
def test_autocleaninvoice(self):
l1 = self.node_factory.get_node()