remove remotesignererror and fix proto-lint

This commit is contained in:
Marko Baricevic
2020-06-15 15:50:10 +02:00
parent 7906da2f54
commit 3d2f98996c
4 changed files with 66 additions and 467 deletions

View File

@@ -24,58 +24,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
type RemoteSignerError struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (m *RemoteSignerError) Reset() { *m = RemoteSignerError{} }
func (m *RemoteSignerError) String() string { return proto.CompactTextString(m) }
func (*RemoteSignerError) ProtoMessage() {}
func (*RemoteSignerError) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{0}
}
func (m *RemoteSignerError) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *RemoteSignerError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_RemoteSignerError.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *RemoteSignerError) XXX_Merge(src proto.Message) {
xxx_messageInfo_RemoteSignerError.Merge(m, src)
}
func (m *RemoteSignerError) XXX_Size() int {
return m.Size()
}
func (m *RemoteSignerError) XXX_DiscardUnknown() {
xxx_messageInfo_RemoteSignerError.DiscardUnknown(m)
}
var xxx_messageInfo_RemoteSignerError proto.InternalMessageInfo
func (m *RemoteSignerError) GetCode() int32 {
if m != nil {
return m.Code
}
return 0
}
func (m *RemoteSignerError) GetDescription() string {
if m != nil {
return m.Description
}
return ""
}
// PubKeyRequest requests the consensus public key from the remote signer.
type PubKeyRequest struct {
}
@@ -84,7 +32,7 @@ func (m *PubKeyRequest) Reset() { *m = PubKeyRequest{} }
func (m *PubKeyRequest) String() string { return proto.CompactTextString(m) }
func (*PubKeyRequest) ProtoMessage() {}
func (*PubKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{1}
return fileDescriptor_9ec52cc5e378f9a4, []int{0}
}
func (m *PubKeyRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -115,15 +63,14 @@ var xxx_messageInfo_PubKeyRequest proto.InternalMessageInfo
// PubKeyResponse is a response message containing the public key.
type PubKeyResponse struct {
PubKey *keys.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
PubKey *keys.PublicKey `protobuf:"bytes,1,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"`
}
func (m *PubKeyResponse) Reset() { *m = PubKeyResponse{} }
func (m *PubKeyResponse) String() string { return proto.CompactTextString(m) }
func (*PubKeyResponse) ProtoMessage() {}
func (*PubKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{2}
return fileDescriptor_9ec52cc5e378f9a4, []int{1}
}
func (m *PubKeyResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -159,13 +106,6 @@ func (m *PubKeyResponse) GetPubKey() *keys.PublicKey {
return nil
}
func (m *PubKeyResponse) GetError() *RemoteSignerError {
if m != nil {
return m.Error
}
return nil
}
// SignVoteRequest is a request to sign a vote
type SignVoteRequest struct {
ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
@@ -176,7 +116,7 @@ func (m *SignVoteRequest) Reset() { *m = SignVoteRequest{} }
func (m *SignVoteRequest) String() string { return proto.CompactTextString(m) }
func (*SignVoteRequest) ProtoMessage() {}
func (*SignVoteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{3}
return fileDescriptor_9ec52cc5e378f9a4, []int{2}
}
func (m *SignVoteRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -221,15 +161,14 @@ func (m *SignVoteRequest) GetVote() *types.Vote {
// SignedVoteResponse is a response containing a signed vote or an error
type SignedVoteResponse struct {
Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
Vote *types.Vote `protobuf:"bytes,1,opt,name=vote,proto3" json:"vote,omitempty"`
}
func (m *SignedVoteResponse) Reset() { *m = SignedVoteResponse{} }
func (m *SignedVoteResponse) String() string { return proto.CompactTextString(m) }
func (*SignedVoteResponse) ProtoMessage() {}
func (*SignedVoteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{4}
return fileDescriptor_9ec52cc5e378f9a4, []int{3}
}
func (m *SignedVoteResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -265,13 +204,6 @@ func (m *SignedVoteResponse) GetVote() *types.Vote {
return nil
}
func (m *SignedVoteResponse) GetError() *RemoteSignerError {
if m != nil {
return m.Error
}
return nil
}
// SignProposalRequest is a request to sign a proposal
type SignProposalRequest struct {
ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
@@ -282,7 +214,7 @@ func (m *SignProposalRequest) Reset() { *m = SignProposalRequest{} }
func (m *SignProposalRequest) String() string { return proto.CompactTextString(m) }
func (*SignProposalRequest) ProtoMessage() {}
func (*SignProposalRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{5}
return fileDescriptor_9ec52cc5e378f9a4, []int{4}
}
func (m *SignProposalRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -327,15 +259,14 @@ func (m *SignProposalRequest) GetProposal() *types.Proposal {
// SignedProposalResponse is response containing a signed proposal or an error
type SignedProposalResponse struct {
Proposal *types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
Error *RemoteSignerError `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
Proposal *types.Proposal `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
}
func (m *SignedProposalResponse) Reset() { *m = SignedProposalResponse{} }
func (m *SignedProposalResponse) String() string { return proto.CompactTextString(m) }
func (*SignedProposalResponse) ProtoMessage() {}
func (*SignedProposalResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{6}
return fileDescriptor_9ec52cc5e378f9a4, []int{5}
}
func (m *SignedProposalResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -371,13 +302,6 @@ func (m *SignedProposalResponse) GetProposal() *types.Proposal {
return nil
}
func (m *SignedProposalResponse) GetError() *RemoteSignerError {
if m != nil {
return m.Error
}
return nil
}
type Message struct {
// Types that are valid to be assigned to Sum:
// *Message_PubKeyRequest
@@ -393,7 +317,7 @@ func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) {
return fileDescriptor_9ec52cc5e378f9a4, []int{7}
return fileDescriptor_9ec52cc5e378f9a4, []int{6}
}
func (m *Message) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -516,7 +440,6 @@ func (*Message) XXX_OneofWrappers() []interface{} {
}
func init() {
proto.RegisterType((*RemoteSignerError)(nil), "tendermint.proto.privval.RemoteSignerError")
proto.RegisterType((*PubKeyRequest)(nil), "tendermint.proto.privval.PubKeyRequest")
proto.RegisterType((*PubKeyResponse)(nil), "tendermint.proto.privval.PubKeyResponse")
proto.RegisterType((*SignVoteRequest)(nil), "tendermint.proto.privval.SignVoteRequest")
@@ -529,78 +452,38 @@ func init() {
func init() { proto.RegisterFile("proto/privval/msgs.proto", fileDescriptor_9ec52cc5e378f9a4) }
var fileDescriptor_9ec52cc5e378f9a4 = []byte{
// 570 bytes of a gzipped FileDescriptorProto
0x1f, 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0xdd, 0x92, 0x7e, 0x7d, 0xfa, 0x37, 0x00, 0x00,
0xff, 0xff, 0xed, 0xfb, 0xba, 0x76, 0xf4, 0x05, 0x00, 0x00,
}
func (m *RemoteSignerError) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *RemoteSignerError) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *RemoteSignerError) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
if len(m.Description) > 0 {
i -= len(m.Description)
copy(dAtA[i:], m.Description)
i = encodeVarintMsgs(dAtA, i, uint64(len(m.Description)))
i--
dAtA[i] = 0x12
}
if m.Code != 0 {
i = encodeVarintMsgs(dAtA, i, uint64(m.Code))
i--
dAtA[i] = 0x8
}
return len(dAtA) - i, nil
// 495 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0x86, 0xd7, 0x34, 0x4d, 0xca, 0xa0, 0x36, 0xe0, 0x42, 0x31, 0x15, 0x58, 0x95, 0x2f, 0x14,
0x09, 0xec, 0x0a, 0xae, 0x1c, 0x50, 0x0f, 0xc8, 0x08, 0x21, 0x85, 0x05, 0x15, 0x89, 0x03, 0x21,
0x76, 0x56, 0xae, 0xd5, 0xc4, 0xbb, 0x78, 0xd6, 0x91, 0xfc, 0x16, 0xbc, 0x15, 0x1c, 0x7b, 0xe4,
0x88, 0x92, 0x17, 0x41, 0xde, 0xdd, 0x24, 0x4e, 0xd2, 0xb4, 0xe1, 0x96, 0x9d, 0x9d, 0xfd, 0xfe,
0x7f, 0x32, 0xbf, 0x0c, 0x8e, 0xc8, 0xb9, 0xe4, 0x81, 0xc8, 0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fc, 0x99, 0xb8, 0xe4, 0xab, 0x9f, 0xa4, 0xf2,
0xbc, 0x88, 0xfc, 0x98, 0x0f, 0x83, 0xb9, 0x6c, 0xfd, 0xe7, 0xc2, 0x57, 0x2c, 0x6a, 0xaa, 0xe3,
0xab, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xab, 0xb8, 0x33, 0xa7, 0xdd, 0x04, 0x00, 0x00,
}
func (m *PubKeyRequest) Marshal() (dAtA []byte, err error) {
@@ -646,18 +529,6 @@ func (m *PubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.Error != nil {
{
size, err := m.Error.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.PubKey != nil {
{
size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i])
@@ -735,18 +606,6 @@ func (m *SignedVoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if m.Error != nil {
{
size, err := m.Error.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.Vote != nil {
{
size, err := m.Vote.MarshalToSizedBuffer(dAtA[:i])
@@ -824,18 +683,6 @@ func (m *SignedProposalResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
_ = i
var l int
_ = l
if m.Error != nil {
{
size, err := m.Error.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintMsgs(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
if m.Proposal != nil {
{
size, err := m.Proposal.MarshalToSizedBuffer(dAtA[:i])
@@ -1020,22 +867,6 @@ func encodeVarintMsgs(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
func (m *RemoteSignerError) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Code != 0 {
n += 1 + sovMsgs(uint64(m.Code))
}
l = len(m.Description)
if l > 0 {
n += 1 + l + sovMsgs(uint64(l))
}
return n
}
func (m *PubKeyRequest) Size() (n int) {
if m == nil {
return 0
@@ -1055,10 +886,6 @@ func (m *PubKeyResponse) Size() (n int) {
l = m.PubKey.Size()
n += 1 + l + sovMsgs(uint64(l))
}
if m.Error != nil {
l = m.Error.Size()
n += 1 + l + sovMsgs(uint64(l))
}
return n
}
@@ -1089,10 +916,6 @@ func (m *SignedVoteResponse) Size() (n int) {
l = m.Vote.Size()
n += 1 + l + sovMsgs(uint64(l))
}
if m.Error != nil {
l = m.Error.Size()
n += 1 + l + sovMsgs(uint64(l))
}
return n
}
@@ -1123,10 +946,6 @@ func (m *SignedProposalResponse) Size() (n int) {
l = m.Proposal.Size()
n += 1 + l + sovMsgs(uint64(l))
}
if m.Error != nil {
l = m.Error.Size()
n += 1 + l + sovMsgs(uint64(l))
}
return n
}
@@ -1221,110 +1040,6 @@ func sovMsgs(x uint64) (n int) {
func sozMsgs(x uint64) (n int) {
return sovMsgs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *RemoteSignerError) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: RemoteSignerError: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: RemoteSignerError: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
}
m.Code = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Code |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthMsgs
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Description = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMsgs(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthMsgs
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthMsgs
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *PubKeyRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
@@ -1443,42 +1158,6 @@ func (m *PubKeyResponse) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Error == nil {
m.Error = &RemoteSignerError{}
}
if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMsgs(dAtA[iNdEx:])
@@ -1689,42 +1368,6 @@ func (m *SignedVoteResponse) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Error == nil {
m.Error = &RemoteSignerError{}
}
if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMsgs(dAtA[iNdEx:])
@@ -1935,42 +1578,6 @@ func (m *SignedProposalResponse) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowMsgs
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthMsgs
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthMsgs
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Error == nil {
m.Error = &RemoteSignerError{}
}
if err := m.Error.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipMsgs(dAtA[iNdEx:])

View File

@@ -6,18 +6,12 @@ option go_package = "github.com/tendermint/tendermint/proto/privval";
import "proto/crypto/keys/types.proto";
import "proto/types/types.proto";
message RemoteSignerError {
int32 code = 1;
string description = 2;
}
// PubKeyRequest requests the consensus public key from the remote signer.
message PubKeyRequest {}
// PubKeyResponse is a response message containing the public key.
message PubKeyResponse {
tendermint.proto.crypto.keys.PublicKey pub_key = 1;
RemoteSignerError error = 2;
}
// SignVoteRequest is a request to sign a vote
@@ -28,8 +22,7 @@ message SignVoteRequest {
// SignedVoteResponse is a response containing a signed vote or an error
message SignedVoteResponse {
tendermint.proto.types.Vote vote = 1;
RemoteSignerError error = 2;
tendermint.proto.types.Vote vote = 1;
}
// SignProposalRequest is a request to sign a proposal
@@ -41,7 +34,6 @@ message SignProposalRequest {
// SignedProposalResponse is response containing a signed proposal or an error
message SignedProposalResponse {
tendermint.proto.types.Proposal proposal = 1;
RemoteSignerError error = 2;
}
message Message {

View File

@@ -27,23 +27,23 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("proto/privval/service.proto", fileDescriptor_1e25bbbdec23c036) }
var fileDescriptor_1e25bbbdec23c036 = []byte{
// 250 bytes of a gzipped FileDescriptorProto
// 247 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0x28, 0xca, 0x2f,
0xc9, 0xd7, 0x2f, 0x28, 0xca, 0x2c, 0x2b, 0x4b, 0xcc, 0xd1, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c,
0x4e, 0xd5, 0x03, 0x8b, 0x0a, 0x09, 0x95, 0xa4, 0xe6, 0xa5, 0xa4, 0x16, 0xe5, 0x66, 0xe6, 0x95,
0xe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1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72,
0x0c, 0x51, 0x7a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x08, 0x53,
0x91, 0x99, 0x28, 0xf1, 0x93, 0xc4, 0x06, 0xe6, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9a,
0xcb, 0x00, 0x84, 0xee, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -73,7 +73,7 @@ func NewPrivValidatorAPIClient(cc *grpc.ClientConn) PrivValidatorAPIClient {
func (c *privValidatorAPIClient) GetPubKey(ctx context.Context, in *PubKeyRequest, opts ...grpc.CallOption) (*PubKeyResponse, error) {
out := new(PubKeyResponse)
err := c.cc.Invoke(ctx, "/tendermint.privval.PrivValidatorAPI/GetPubKey", in, out, opts...)
err := c.cc.Invoke(ctx, "/tendermint.proto.privval.PrivValidatorAPI/GetPubKey", in, out, opts...)
if err != nil {
return nil, err
}
@@ -82,7 +82,7 @@ func (c *privValidatorAPIClient) GetPubKey(ctx context.Context, in *PubKeyReques
func (c *privValidatorAPIClient) SignVote(ctx context.Context, in *SignVoteRequest, opts ...grpc.CallOption) (*SignedVoteResponse, error) {
out := new(SignedVoteResponse)
err := c.cc.Invoke(ctx, "/tendermint.privval.PrivValidatorAPI/SignVote", in, out, opts...)
err := c.cc.Invoke(ctx, "/tendermint.proto.privval.PrivValidatorAPI/SignVote", in, out, opts...)
if err != nil {
return nil, err
}
@@ -91,7 +91,7 @@ func (c *privValidatorAPIClient) SignVote(ctx context.Context, in *SignVoteReque
func (c *privValidatorAPIClient) SignProposal(ctx context.Context, in *SignProposalRequest, opts ...grpc.CallOption) (*SignedProposalResponse, error) {
out := new(SignedProposalResponse)
err := c.cc.Invoke(ctx, "/tendermint.privval.PrivValidatorAPI/SignProposal", in, out, opts...)
err := c.cc.Invoke(ctx, "/tendermint.proto.privval.PrivValidatorAPI/SignProposal", in, out, opts...)
if err != nil {
return nil, err
}
@@ -133,7 +133,7 @@ func _PrivValidatorAPI_GetPubKey_Handler(srv interface{}, ctx context.Context, d
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tendermint.privval.PrivValidatorAPI/GetPubKey",
FullMethod: "/tendermint.proto.privval.PrivValidatorAPI/GetPubKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrivValidatorAPIServer).GetPubKey(ctx, req.(*PubKeyRequest))
@@ -151,7 +151,7 @@ func _PrivValidatorAPI_SignVote_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tendermint.privval.PrivValidatorAPI/SignVote",
FullMethod: "/tendermint.proto.privval.PrivValidatorAPI/SignVote",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrivValidatorAPIServer).SignVote(ctx, req.(*SignVoteRequest))
@@ -169,7 +169,7 @@ func _PrivValidatorAPI_SignProposal_Handler(srv interface{}, ctx context.Context
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/tendermint.privval.PrivValidatorAPI/SignProposal",
FullMethod: "/tendermint.proto.privval.PrivValidatorAPI/SignProposal",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PrivValidatorAPIServer).SignProposal(ctx, req.(*SignProposalRequest))
@@ -178,7 +178,7 @@ func _PrivValidatorAPI_SignProposal_Handler(srv interface{}, ctx context.Context
}
var _PrivValidatorAPI_serviceDesc = grpc.ServiceDesc{
ServiceName: "tendermint.privval.PrivValidatorAPI",
ServiceName: "tendermint.proto.privval.PrivValidatorAPI",
HandlerType: (*PrivValidatorAPIServer)(nil),
Methods: []grpc.MethodDesc{
{

View File

@@ -1,5 +1,5 @@
syntax = "proto3";
package tendermint.privval;
package tendermint.proto.privval;
option go_package = "github.com/tendermint/tendermint/proto/privval";
import "proto/privval/msgs.proto";