SHARE
TWEET

Untitled

a guest Jun 24th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. chans = lnd.listchannels(source=mychan)['channels']
  2. for chan in chans:
  3.     if chan['active'] == False:
  4.         total_inactive += 1
  5.         print('inactive chan with node: ' + chan['destination'])
  6.     else:
  7.         total_active += 1
  8.  
  9. print('my inactive chans: ' + str(total_inactive))
  10. print('my active chans: ' + str(total_active))
  11.      
  12. my inactive chans: 2
  13. my active chans: 23
  14.      
  15. "num_active_channels": 25,
  16. "num_inactive_channels": 5,
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top