ElementsProject / ElementsProject/peerswap
CLN plugin doesn't detect sync complete
- Dominant language
- Go
- Stars
- 128
- Forks
- 84
- Avg merge
- 3h 1m
- Merged PRs (30d)
- 1
Description
From the Discord discussion [here](https://discord.com/channels/905126649224388629/905127434779766785/1379382526497394768).
Peerswap `5.0.0-rc2`
CLN `v25.02.2`
Elementsd `v23.2.7`
On `lightningd` startup, Peerswap logs end with `plugin-peerswap: Waiting for cln to be synced...`, but looking through the code, it seems that there should be a subsequent `CLN synced` message if the process continued successfully.
A quick investigation indicates there might be an infinite loop during the sync verification [here](https://github.com/ElementsProject/peerswap/blob/95695806541dd7376c035e47ad9cb396bb72763e/cmd/peerswap-plugin/main.go#L521), which checks on the `glightning` variables `WarningBitcoinSync` and `WarningLightningSync` [here](https://github.com/ElementsProject/glightning/blob/f3064a110c6b3b0e4c1c1c018162d59a62381f01/glightning/lightning.go#L1215).
Tried to whip up a quick PR to test these values for `nil` instead of `""`, but the typing didn't work. I'm not a Go programmer (yet). Perhaps there is an issue with `omitempty` on these properties and the marshalling or unmarshalling of the values?
It's also possible my config or unique combination of versions is to blame, so any suggestions would be appreciated to gather more information on the RPC connectivity.
Contributor guide
Assessment
This issue has not been assessed yet.