Skip to content

feat[electrum]: Support server.features on all feature combinations#150

Open
junderw wants to merge 1 commit into
mempoolfrom
junderw/feat/electrum-features
Open

feat[electrum]: Support server.features on all feature combinations#150
junderw wants to merge 1 commit into
mempoolfrom
junderw/feat/electrum-features

Conversation

@junderw
Copy link
Copy Markdown
Member

@junderw junderw commented May 24, 2026

Closes #149

Adds the server.features endpoint on electrum regardless of feature flags.

If the electrum-discovery feature isn't enabled, the hosts value is an empty HashMap.

At least this will prevent errors when clients attempt to query this.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds unconditional support for the Electrum server.features RPC so Electrum/Sparrow clients don’t fail when electrum-discovery is not enabled, aligning behavior with the standard Electrum protocol expectations.

Changes:

  • Make server.features available regardless of electrum-discovery, returning a shared ServerFeatures struct per connection.
  • Always include electrum_public_hosts in Config, defaulting to None when electrum-discovery is disabled so hosts serializes as an empty map.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/electrum/server.rs Removes feature-gating for server.features and wires a shared Arc<ServerFeatures> into each connection.
src/config.rs Makes electrum_public_hosts part of Config in all builds, with None when discovery is not compiled in.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server.features should always be supported

3 participants