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

<p>If you look at your output of <code>getinfo</code> 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:</p>

<p><code>lightning-cli connect 03efccf2c383d7bf340da9a3f02e2c23104a0e4fe8ac1a880c8e2dc92fbdacd9df@144.76.235.20:9735</code></p>

<p>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. </p>

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

CC BY-SA 4.0
2019-06-05T10:15:50.870Z
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.
sikario
CC BY-SA 4.0
2019-06-05T15:34:20.837Z
Oh sorry overread that you are on testnet. No you need to connect to a testnet node for example htlc.me
Rene Pickhardt
CC BY-SA 4.0
2019-06-05T07:03:32.457Z
2019-06-05T07:03:32.457Z
Rene Pickhardt
<p>I have setup a lightning node on testnet using c-lightning.
The lightning-cli getinfo command output:</p>

<pre><code>{

"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"
}
</code></pre>

<p>But lightning-cli listchannels and listnodes return empty values:</p>

<pre><code>{
"nodes" : []
}
</code></pre>

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

<lightning-network><testnet><core-lightning>
Lightning Network on testnet - listchannels and listnodes returning empty values
sikario
# Lightning Network on testnet - listchannels and listnodes returning empty values

(Asked by: username_0 on 2019-06-05)

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?

**Tags:** lightning-network, testnet, core-lightning


---

## 1 answers

### Answer by username_1 on 2019-06-05. Score: 1 | Accepted answer

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.username_1.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

> **Comments:**
> **username_0**: 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.  
> **username_1**: Oh sorry overread that you are on testnet. No you need to connect to a testnet node for example htlc.me  

---

