Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getinfo doesn't show inactive lnd channels, channelbalance does #1130

Closed
1 task
kilrau opened this issue Aug 8, 2019 · 0 comments · Fixed by #1317
Closed
1 task

getinfo doesn't show inactive lnd channels, channelbalance does #1130

kilrau opened this issue Aug 8, 2019 · 0 comments · Fixed by #1317
Assignees
Labels
bug Something isn't working good first issue Good for newcomers lightning Lightning network & lnd integration P2 mid priority

Comments

@kilrau
Copy link
Contributor

kilrau commented Aug 8, 2019

Background

Inactive lnd channels don't show up in xucli getinfo under "inactive" but in xucli channelbalance. Tested on native simnet with both, lndbtc & lndltc.

Your environment

  • version of xud: latest master (HEAD 3c46327)
  • which operating system (uname -a on *Nix): ubuntu 18.04.3
  • version of btcd, bitcoind, ltcd, litecoind, geth, parity, raiden, lnd or other chain backend: native simnet
  • any other relevant environment details:

Steps to reproduce

  • install native simnet and wait for 1 btc channel, 1 ltc channel, 2 raiden channels to be open. Take peer offline to get channel marked as inactive
  • outcome:
kilrau@K-Yoga:~$ xucli channelbalance
13.4548 BTC
50000 DAI
1000.99875999 LTC
500 WETH
kilrau@K-Yoga:~$ lndbtc-lncli listchannels
{
    "channels": [
        {
            "active": false,
            "remote_pubkey": "036f9b004f047283b33a640bc4afdd26e2eb82e73938f8ac0796641ad20dc5bdd4",
            "channel_point": "fde8e01e6c2b3374003efbbefdd1d948994e8d63631f111d7192b717b008b7b9:1",
            "chan_id": "54641329854021633",
            "capacity": "2500000000",
            "local_balance": "1345480000",
            "remote_balance": "1154510950",
            "commit_fee": "9050",
            "commit_weight": "724",
            "fee_per_kw": "12500",
            "unsettled_balance": "0",
            "total_satoshis_sent": "0",
            "total_satoshis_received": "95480000",
            "num_updates": "18",
            "pending_htlcs": [
            ],
            "csv_delay": 1173,
            "private": false,
            "initiator": false,
            "chan_status_flags": "ChanStatusDefault"
        }
    ]
}
kilrau@K-Yoga:~$ xucli getinfo
{
  "version": "1.0.0-testnet.1",
  "nodePubKey": "032eb6b343e2e9685a2339516c2fbf8c31d0ad45e6d32344060b51ddd88ed7e62b",
  "urisList": [],
  "numPeers": 3,
  "numPairs": 4,
  "orders": {
    "peer": 1125,
    "own": 0
  },
  "lndMap": [
    [
      "BTC",
      {
        "error": "",
        "channels": {
          "active": 0,
          "inactive": 0,
          "pending": 0
        },
        "chainsList": [
          {
            "chain": "bitcoin",
            "network": "simnet"
          }
        ],
        "blockheight": 52027,
        "urisList": [],
        "version": "0.6.1-beta commit=v0.6.1-beta",
        "alias": "BTC@K-Yoga"
      }
    ],
    [
      "LTC",
      {
        "error": "",
        "channels": {
          "active": 1,
          "inactive": 0,
          "pending": 0
        },
        "chainsList": [
          {
            "chain": "litecoin",
            "network": "simnet"
          }
        ],
        "blockheight": 36371,
        "urisList": [],
        "version": "0.6.1-beta commit=v0.6.1-beta",
        "alias": "LTC@K-Yoga"
      }
    ]
  ],
  "raiden": {
    "error": "",
    "address": "0xa00aF9c105B1B0140e20f294b36991A970a9cdB5",
    "channels": 4,
    "version": ""
  }
}

xud.log

Expected behaviour

  • getbalance separates balance into 10 (3.4548 inactive) when there are inactive channels with balance. Since there also can be a pending state, worst case it's 10 BTC (3.4548 inactive | 0.4 pending)

If all channels are active, output stays as is without any paranthesis.

Dependency: #1062

@kilrau kilrau added bug Something isn't working lightning Lightning network & lnd integration simnet labels Aug 8, 2019
@kilrau kilrau changed the title getinfo doesn't show btc channels getinfo doesn't show inactive lnd channels Aug 8, 2019
@kilrau kilrau changed the title getinfo doesn't show inactive lnd channels getinfo doesn't show inactive lnd channels, channelbalance does Aug 8, 2019
@kilrau kilrau removed the simnet label Aug 8, 2019
@sangaman sangaman added the good first issue Good for newcomers label Aug 29, 2019
@kilrau kilrau assigned rsercano and krrprr and unassigned rsercano Oct 9, 2019
@kilrau kilrau added the P2 mid priority label Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers lightning Lightning network & lnd integration P2 mid priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants