Skip to content

Peerswap CLN lists disconnected peers as active #312

@Impa10r

Description

@Impa10r

Even if the peer has been offline since the plugin started. So, when you try to swap, it fails with "-1:fundingChannels is not connected". Latest commit.

$ lcli peerswap-listpeers
[
...
  {
      "nodeid": "020a654db4feba771ba2f82b9e97297d6c5294ddd40f167c6538149c162e4aa63c",
      "swaps_allowed": true,
      "supported_assets": [
         "btc",
         "lbtc"
      ],
      "channels": [
         {
            "short_channel_id": "2902458x897x0",
            "local_balance": 167000,
            "remote_balance": 33000,
            "state": "CHANNELD_NORMAL"
         }
...
]

$ lcli listpeers
{
   "peers": [
      {
...
      },
      {
         "id": "020a654db4feba771ba2f82b9e97297d6c5294ddd40f167c6538149c162e4aa63c",
         "connected": false,
         "num_channels": 1,
...
}

It knows that it cannot connect:

2024-09-08T09:18:04.033Z DEBUG   020a654db4feba771ba2f82b9e97297d6c5294ddd40f167c6538149c162e4aa63c-connectd: Failed connected out: All addresses failed: Error connecting to gzwoaaqw7jf33cg7sxzedsefulscvpal5ys455eke24owb34w2d4dqqd.onion: Tor server reply: host unreachable. gzwoaaqw7jf33cg7sxzedsefulscvpal5ys455eke24owb34w2d4dqqd.onion:9735: Connection establishment: Connection refused. 10.21.21.9:9735: Connection establishment: Connection timed out. 
2024-09-08T09:18:04.033Z DEBUG   020a654db4feba771ba2f82b9e97297d6c5294ddd40f167c6538149c162e4aa63c-lightningd: Will try reconnect in 2 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions