In CLI mode, is_synchronized should never return true if connected is false
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.6k
- Forks
- 3.5k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 61
Description
our CLI needs some love. with latest lightning implementation lots of merchants willing to accept lightning payments consider electrum.
I have been informed by someone I recommended electrum to (and also tested myself before opening this of course) that electrum is_synchronized will return True regardless if electrum getinfo reports "connected": false, . In the tested use case I was also using oneserver set (so 1 spv node) so maybe is_synchronzied returned true because blockchain_height == server_height but that was the last known situation because the daemon was disconnected.
So I propose to always return is_synchronized = false if blockchain_hegiht != server_height and/OR "connected": false,
I also propose adding a 1 line warning / header message return in case "connected": false, for at least the following CLI commands:
- list_requests
- list_channels
If this breaks compatibility with offline (cold storage) CLI wallets, maybe we need a new config version with a new param such as offlinewallet true | false that ignores connected? Sorry if this is already covered -- did not got the chance to test on a cold CLI wallet.
I really hope we can also throw an eye on #2573 , seams like the easiest way around those missing features are annoying cronjobs and there are some pending projects that could really use them.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the CLI entry points for is_synchronized, getinfo, list_requests, and list_channels, then compare synchronization results when connected is false. Done means disconnected wallets no longer report synchronization and the listed commands provide the requested warning, while the compatibility impact on offline wallets is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100