I am super new to lightning development and just starting to play around with stuff and wanted to execute some circular rebalancing payments, but was confronted with problems coming from the getroute method

My problem: I setup a regtest graph consisting of 3 nodes A<—(25Ksat)-(40Ksat)-(15Ksat)—>B<—(35Ksat)-(65Ksat)-(30Ksat)—>C<—(60Ksat)-(90Ksat)-(30Ksat)—>A.

From the node A I execute

lcli getroute <C_ID> 5000sat 0 <TRIED_ALL_VALUES> <A_ID> 100.0 ["<C_ID>"]

excludes contains C_ID to avoid showing direct connections. When excludes contains <A_ID> the direct connection is proposed. I hope to see the A—>B—>C route, but only get A—>C.

Now, all the channels I created are publicly announced, but if I try to execute lcli listchannels on any of my nodes, I end seeing only my channels. What did I miss? Additionally, if I execute lcli listnodes I only see my direct peers, not the other nodes on the network. As if the announcements on the gossip network do not come though.

I am super grateful for any hint or thought!

Every node has the same config. Here are the configs from lcli listconfigs (except the plugins section, which is quite large and would be distracting):

   "# version": "v0.12.1",
   "conf": "/root/.lightning/config",
   "lightning-dir": "/data/lightning",
   "network": "regtest",
   "allow-deprecated-apis": true,
   "rpc-file": "lightning-rpc",
   "plugins": [...],
   "important-plugins": [...],
   "always-use-proxy": false,
   "daemon": true,
   "wallet": "sqlite3:///data/lightning/regtest/lightningd.sqlite3",
   "large-channels": false,
   "experimental-dual-fund": false,
   "experimental-onion-messages": false,
   "experimental-offers": false,
   "experimental-shutdown-wrong-funding": false,
   "rgb": "03dac7",
   "alias": "IRATEGENESIS-v0.12.1",
   "pid-file": "/data/lightning/lightningd-regtest.pid",
   "ignore-fee-limits": true,
   "watchtime-blocks": 6,
   "max-locktime-blocks": 2016,
   "funding-confirms": 1,
   "cltv-delta": 6,
   "cltv-final": 20,
   "commit-time": 10,
   "fee-base": 0,
   "rescan": 30,
   "fee-per-satoshi": 0,
   "htlc-minimum-msat": "0msat",
   "htlc-maximum-msat": "18446744073709551615msat",
   "max-concurrent-htlcs": 483,
   "max-dust-htlc-exposure-msat": "50000000msat",
   "min-capacity-sat": 10000,
   "disable-ip-discovery": false,
   "offline": false,
   "autolisten": true,
   "disable-dns": false,
   "encrypted-hsm": false,
   "rpc-file-mode": "0600",
   "log-level": "info",
   "log-timestamps": true,
   "log-prefix": "",
   "log-file": "/var/log/lightning/lightningd.log"

And here is the result of lcli getinfo:

   "id": "03dac78928a90839c2e7a4ba1e5a1567466f944ba1345cfe1fee9da226f1a34aef",
   "alias": "IRATEGENESIS-v0.12.1",
   "color": "03dac7",
   "num_peers": 2,
   "num_pending_channels": 0,
   "num_active_channels": 2,
   "num_inactive_channels": 0,
   "address": [],
   "binding": [
         "type": "ipv6",
         "address": "::",
         "port": 19846
         "type": "ipv4",
         "address": "",
         "port": 19846
   "version": "v0.12.1",
   "blockheight": 162,
   "network": "regtest",
   "msatoshi_fees_collected": 0,
   "fees_collected_msat": "0msat",
   "lightning-dir": "/data/lightning/regtest",
   "our_features": {
      "init": "08a000080269a2",
      "node": "88a000080269a2",
      "channel": "",
      "invoice": "02000000024100"
  • Which node implementation are you using? I could not guess from the lcli name (LND client is usually lncli, C-lightning client lightning-cli).
    – OptOut
    Dec 6, 2022 at 12:40
  • From the syntax of getroute I infer it is C-lightning.
    – OptOut
    Dec 6, 2022 at 21:53

2 Answers 2


Since the issue was present on regtest environment only, I found out that the channel establishment didn't collect enough confirmations. In the environment I have been using, it was enough to change the behaviour of the mining nodes to mine new blocks more frequently, while on polar for example I did quick mining for several times. For other ways to simulate mining refer to Bitcoin regtest mining.

I found out that the channel get announced after at least 6 confirmationsdocs


The exclude parameter is a channel ID, not a node ID. You should specify the ID of the A<->C channel (in the right, or in both directions), in order to exclude the A->C direct path.

See the documentation of getroute in the help of lightning-cli (of C-lightning): lightning-cli help getroute.

"exclude is a JSON array of short-channel-id/direction (e.g. [ "564334x877x1/0", "564195x1292x0/1" ]) or node-id which should be excluded from consideration for routing. The default is not to exclude any channels or nodes. Note if the source or destination is excluded, the command result is undefined."

  • 1
    Thank you for you answer! If you take a closer look at the very same piece of documentation you provided, you will see: or node-id which should be excluded from consideration for routing Additionally, I copied this behavior from one of the most supported plugins in the lightning environment - rebalance.py.
    – kostjaigin
    Dec 7, 2022 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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