Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server.version returns a float, not a string #135

Closed
benma opened this issue Jul 2, 2019 · 6 comments
Closed

server.version returns a float, not a string #135

benma opened this issue Jul 2, 2019 · 6 comments

Comments

@benma
Copy link

benma commented Jul 2, 2019

The server.version should return two strings.

Now it returns ["ElectrumPersonalServer 0.1.7", 1.2] instead of ["ElectrumPersonalServer 0.1.7", "1.2"]

Electrum personal server used to do this:
https://github.com/chris-belcher/electrum-personal-server/blob/c9aa9f068e60/electrumpersonalserver/server/common.py#L249-L250

Relevant lines now:

send_response(sock, query, ["ElectrumPersonalServer "
+ SERVER_VERSION_NUMBER, protocol_version[0]])

@chris-belcher
Copy link
Owner

Thanks for the issue. I'll create a fix soon, it should be as simple as surrounding that value with str()

How did you even notice this?

@benma
Copy link
Author

benma commented Jul 4, 2019

Thanks :)

How did you even notice this?

A BitBox App user tried to connect with EPS and reported this error:

Failed to unmarshal response: ["ElectrumPersonalServer 0.1.7", 1.2]: Failed to unmarshal JSON: json: cannot unmarshal number into Go value of type string

I know it used to work in the past, so I looked at the file history.

(the client expects two strings, see https://github.com/digitalbitbox/bitbox-wallet-app/blob/43477e8fe7ebd08693270456998ecb82d63b4a66/backend/coins/btc/electrum/client/client.go#L133)

chris-belcher added a commit that referenced this issue Jul 5, 2019
@chris-belcher
Copy link
Owner

I've pushed a commit 9bd9d7d which hopefully fixes this issue. Try it out when you get the chance to.

@benma
Copy link
Author

benma commented Jul 5, 2019

Thanks. I will probably only get around to it in ~1.5 weeks, I'll post back here then.

@benma
Copy link
Author

benma commented Jul 16, 2019

Tested and works. Thanks for the quick response!

@benma benma closed this as completed Jul 16, 2019
@benma
Copy link
Author

benma commented Sep 8, 2019

Unless I looked in the wrong place, it seems this has not made it into a release yet. Would you be willing to make a new release soon?

Cheers.

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

No branches or pull requests

2 participants