ElementsProject / ElementsProject/peerswap

Peerswap CLN lists disconnected peers as active

Open
#312 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
128
Forks
84
Avg merge
3h 1m
Merged PRs (30d)
1

Description

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](https://github.com/ElementsProject/peerswap/commit/89d79f7bf2ea0d5bec61933a2f8438947250db70).

```
$ 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

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.