From bd369edd10735ca14fdd6adf101691337ab0802c Mon Sep 17 00:00:00 2001 From: Michael Schmoock Date: Fri, 6 Dec 2019 11:23:37 +0100 Subject: [PATCH] chore: reduce rpc load in is_channel_active helper --- contrib/pyln-testing/pyln/testing/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index 08ede1768713..c33b7d122cef 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -765,7 +765,7 @@ def get_channel_scid(self, other): return channel['short_channel_id'] def is_channel_active(self, chanid): - channels = self.rpc.listchannels()['channels'] + channels = self.rpc.listchannels(chanid)['channels'] active = [(c['short_channel_id'], c['channel_flags']) for c in channels if c['active']] return (chanid, 0) in active and (chanid, 1) in active