Skip to content

Commit

Permalink
chore: reduce rpc load in is_channel_active helper
Browse files Browse the repository at this point in the history
  • Loading branch information
m-schmoock authored and cdecker committed Dec 7, 2019
1 parent 44c23ed commit bd369ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/pyln-testing/pyln/testing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bd369ed

Please sign in to comment.