Skip to content

Conversation

@jsfour
Copy link
Contributor

@jsfour jsfour commented Mar 31, 2022

This resolves #1711. The issue causes problems with downstream libraries if the jsonrpc parameter isn't included with an rpc request.

Oddly enough the comment on line 159 calls for defaulting to RpcVersion1 but the code does not do it.

I just added in a quick check and default in the case of an empty version.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2068427144

  • 1 of 3 (33.33%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 54.186%

Changes Missing Coverage Covered Lines Changed/Added Lines %
btcjson/jsonrpc.go 1 3 33.33%
Totals Coverage Status
Change from base Build 2067189692: 0.005%
Covered Lines: 24769
Relevant Lines: 45711

💛 - Coveralls

@jcvernaleo jcvernaleo self-assigned this Apr 9, 2022
Copy link
Member

@jcvernaleo jcvernaleo left a comment

Choose a reason for hiding this comment

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

OK

@jcvernaleo jcvernaleo merged commit 71c8443 into btcsuite:master Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RPCS: Failed to marshal reply: rpcversion '' is invalid

3 participants