janoside / lndash

Admin UI for LND
https://lnd-admin.btc21.org
MIT License
76 stars 24 forks source link

Nodeinfo fails to load/partially loads #55

Open ExperiBass opened 1 year ago

ExperiBass commented 1 year ago

Describe the bug Most of the time, the DescribeGraphResponse.nodes response ends up being filled with null values instead of the proper node info.

Environment (please complete the following information):

To Reproduce Steps to reproduce the behavior:

  1. Start LNDash.
  2. Navigate to dashboard.
  3. Behold, Unknown Node

Screenshots or Log Output

Additional context A workaround i found was checking if DescribeGraphResponse.nodes and DescribeGraphResponse.nodes[0] were null. It feels like a patch over the root issue though, cause the last response i captured has only .nodes[0] populated.

lncli returned the graph just fine.

{
    "nodes": [
        {
            "channels": [],
            "node": {
                "addresses": [
                    {
                        "network": "tcp",
                        "addr": "z4hqwq2bzs55odfo5ni52trfflg5ux2waxl73cw7tvmzwgxxr2dwcvyd.onion:9736"
                    },
                    {
                        "network": "tcp",
                        "addr": "85.216.202.47:9735"
                    }
                ],
                "features": {
                    "0": {
                        "name": "data-loss-protect",
                        "is_required": true,
                        "is_known": true
                    },
                    "5": {
                        "name": "upfront-shutdown-script",
                        "is_required": false,
                        "is_known": true
                    },
                    // etc, etc, super shiny
                },
                "custom_records": {},
                "last_update": 1901300000,
                "pub_key": "03a6680e79e30f050d4f32f1fb9d046cc6efb5ed4cc99eeedba6b2e89cbf838691",
                "alias": "BleskomatDecentruck",
                "color": "#000000"
            },
            "num_channels": 58,
            "total_capacity": "85827105"
        },
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        null,
        // you get the point, right?
    ]
}