Use btcd pver instead of wire pver in RPC encoding.
Along the same lines as the previous commit, the RPCs that return serialized data structures should use the max protocol version btcd supports as opposed to the maximum protocol version etcwire supports.
This commit is contained in:
parent
fd025a7368
commit
47e65634a7
1 changed files with 1 additions and 1 deletions
|
@ -537,7 +537,7 @@ func handleAddNode(s *rpcServer, cmd btcjson.Cmd) (interface{}, error) {
|
|||
// latest protocol version and returns a hex-encoded string of the result.
|
||||
func messageToHex(msg btcwire.Message) (string, error) {
|
||||
var buf bytes.Buffer
|
||||
err := msg.BtcEncode(&buf, btcwire.ProtocolVersion)
|
||||
err := msg.BtcEncode(&buf, maxProtocolVersion)
|
||||
if err != nil {
|
||||
return "", btcjson.Error{
|
||||
Code: btcjson.ErrInternal.Code,
|
||||
|
|
Loading…
Reference in a new issue