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:
Dave Collins 2014-05-07 11:33:32 -05:00
parent fd025a7368
commit 47e65634a7

View file

@ -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,