Total channel count differs from explorers

0

I have my own c-lightning node. listchannels returns 11,455 but explorers, e.g https://explore.casa/ show around 39,000. Do I need to set something to get all channel info?

$ lightning-cli listchannels | grep source | wc
  11455   22910  996585

I'm thinking "initial_routing_sync" might be relevant. But I can't find how to use it.

upon receiving an init message with the initial_routing_sync flag set to 1: SHOULD send gossip messages for all known channels and nodes, as if they were just received.

https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md


Update 1

I restarted clightning 3 hours ago but still the count is 8,433. And seems the number stays at the almost same number.

What I did:

1. Stop lightningd
2. Delete /home/lightningd/.lightning/gossip_store
3. Start lightningd
4. Connect to a peer

$ lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735

5. Wait for 3 hours
6. Check the count

$ lightning-cli listchannels | grep source | wc
   8433   16866  733671

zono

Posted 2019-03-27T15:43:16.070

Reputation: 1 569

Answers

2

I thought we had that question before but the only one similar I could find was this one 1ML shows larger number of nodes comparing to other lightning network explorers which was not quite the same.

So to answer your question: listchannels depicts information your node knows from the gossip protocol. If your node is new this could take some time which is most likely the reason for your lower number.

I once had a corrupted gossip_store file in .lightning folder after upgrading a node in that case shutdown your node delete the gossip store file and restart for a new sync. Pay attention not to delete any other files in that directory as they are critical to access your funds

Rene Pickhardt

Posted 2019-03-27T15:43:16.070

Reputation: 6 565

The problem was solved after updating the version. I'm not sure but this can be relevant. https://github.com/ElementsProject/lightning/issues/2504 Thanks.

zono 2019-05-20T10:30:46.440