Why getinfo() and listchannels() inactive channel count differs? 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,
It would appear that you have (or rather had them at the time you ran the commands) 6 channels that were funded, but not yet announced. This is most likely why your node sees them (getinfo) but gossipd doesn't yet (listchannels) since they haven't been announced just yet.