Merge pull request #1717 from nspcc-dev/rpc-base64

RPC base64 changes
This commit is contained in:
Roman Khimov 2021-02-08 10:42:26 +03:00 committed by GitHub
commit 1f98289f5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 23 deletions

View file

@ -4,7 +4,6 @@ import (
"context"
"crypto/elliptic"
"encoding/binary"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
@ -915,7 +914,7 @@ func (s *Server) getStorage(ps request.Params) (interface{}, *response.Error) {
return nil, rErr
}
key, err := ps.Value(1).GetBytesHex()
key, err := ps.Value(1).GetBytesBase64()
if err != nil {
return nil, response.ErrInvalidParams
}
@ -925,7 +924,7 @@ func (s *Server) getStorage(ps request.Params) (interface{}, *response.Error) {
return "", nil
}
return hex.EncodeToString(item.Value), nil
return item.Value, nil
}
func (s *Server) getrawtransaction(reqParams request.Params) (interface{}, *response.Error) {