2

I have setup a lightning node on testnet using c-lightning. The lightning-cli getinfo command output:

{

"id" : "0315a5746114ab9f3e8f0a3f2f73153ef1e4a8fb58daa54fa97c9603dfab989a30",
   "alias" : "snjnode",
   "color" : "ff9900",
   "num_peers" : 0,
   "num_pending_channels" : 0,
   "num_active_channels" : 0,
   "num_inactive_channels" : 0,
   "address" : [
      {
         "type" : "ipv4",
         "address" : "103.72.61.18",
         "port" : 9735
      }
   ],
   "binding" : [],
   "version" : "v0.7.0-408-g0c189fe",
   "blockheight" : 1519822,
   "network" : "testnet",
   "msatoshi_fees_collected" : 0,
   "fees_collected_msat" : "0msat"
}

But lightning-cli listchannels and listnodes return empty values:

{
"nodes" : []
}

It should return the list of all nodes in the testnet network right? What is wrong?

1

In order for your node to be aware of all (public) nodes and channels on the network it need to download them first.

If you look at your output of getinfo you see that you don't have any peers. You should peer with at least one node for example with mine which you can find at https:ln.rene-pickhardt.de you do this via:

lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735

The gossip deamon of your node will then query my node for the network. Once the syncing is complete you will see all channels and nodes with the commands you mentioned.

Not that you will see some channels nodes right away as the output lists the nodes and channels it is already aware of

  • Okay,Thanks. I get what you are saying, but will it work if I connect to your node? Since my node is on testnet and your node is on mainnet. – Sanjay Nath Jun 5 at 10:15
  • Oh sorry overread that you are on testnet. No you need to connect to a testnet node for example htlc.me – Rene Pickhardt Jun 5 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.