I have strange results comparing node information outputs between getinfo() and listchannels() calls. Maybe someone has thoughts what is wrong (with my trivial code or with c-lightning itself):
chans = lnd.listchannels(source=mychan)['channels']
for chan in chans:
if chan['active'] == False:
total_inactive += 1
print('inactive chan with node: ' + chan['destination'])
else:
total_active += 1
print('my inactive chans: ' + str(total_inactive))
print('my active chans: ' + str(total_active))
gives me:
my inactive chans: 2
my active chans: 23
But, lightning-cli getinfo gives:
"num_active_channels": 25,
"num_inactive_channels": 5,