mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 06:31:57 +00:00
proto: change to use gogofaster (#4957)
This commit is contained in:
+24
-77
@@ -6,9 +6,7 @@ package coregrpc
|
||||
import (
|
||||
context "context"
|
||||
fmt "fmt"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
golang_proto "github.com/golang/protobuf/proto"
|
||||
types "github.com/tendermint/tendermint/abci/types"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
@@ -20,7 +18,6 @@ import (
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = golang_proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
@@ -31,9 +28,6 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type RequestPing struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RequestPing) Reset() { *m = RequestPing{} }
|
||||
@@ -70,10 +64,7 @@ func (m *RequestPing) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_RequestPing proto.InternalMessageInfo
|
||||
|
||||
type RequestBroadcastTx struct {
|
||||
Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
|
||||
}
|
||||
|
||||
func (m *RequestBroadcastTx) Reset() { *m = RequestBroadcastTx{} }
|
||||
@@ -117,9 +108,6 @@ func (m *RequestBroadcastTx) GetTx() []byte {
|
||||
}
|
||||
|
||||
type ResponsePing struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ResponsePing) Reset() { *m = ResponsePing{} }
|
||||
@@ -156,11 +144,8 @@ func (m *ResponsePing) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_ResponsePing proto.InternalMessageInfo
|
||||
|
||||
type ResponseBroadcastTx struct {
|
||||
CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx,proto3" json:"check_tx,omitempty"`
|
||||
DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx,proto3" json:"deliver_tx,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
CheckTx *types.ResponseCheckTx `protobuf:"bytes,1,opt,name=check_tx,json=checkTx,proto3" json:"check_tx,omitempty"`
|
||||
DeliverTx *types.ResponseDeliverTx `protobuf:"bytes,2,opt,name=deliver_tx,json=deliverTx,proto3" json:"deliver_tx,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ResponseBroadcastTx) Reset() { *m = ResponseBroadcastTx{} }
|
||||
@@ -212,41 +197,35 @@ func (m *ResponseBroadcastTx) GetDeliverTx() *types.ResponseDeliverTx {
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RequestPing)(nil), "tendermint.rpc.grpc.RequestPing")
|
||||
golang_proto.RegisterType((*RequestPing)(nil), "tendermint.rpc.grpc.RequestPing")
|
||||
proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx")
|
||||
golang_proto.RegisterType((*RequestBroadcastTx)(nil), "tendermint.rpc.grpc.RequestBroadcastTx")
|
||||
proto.RegisterType((*ResponsePing)(nil), "tendermint.rpc.grpc.ResponsePing")
|
||||
golang_proto.RegisterType((*ResponsePing)(nil), "tendermint.rpc.grpc.ResponsePing")
|
||||
proto.RegisterType((*ResponseBroadcastTx)(nil), "tendermint.rpc.grpc.ResponseBroadcastTx")
|
||||
golang_proto.RegisterType((*ResponseBroadcastTx)(nil), "tendermint.rpc.grpc.ResponseBroadcastTx")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_15f63baabf91876a) }
|
||||
func init() { golang_proto.RegisterFile("rpc/grpc/types.proto", fileDescriptor_15f63baabf91876a) }
|
||||
|
||||
var fileDescriptor_15f63baabf91876a = []byte{
|
||||
// 330 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcd, 0x4a, 0xc3, 0x40,
|
||||
0x14, 0x85, 0x99, 0x22, 0xfe, 0xdc, 0xd6, 0x2e, 0xa6, 0x22, 0x92, 0x45, 0xa8, 0x45, 0x6a, 0x57,
|
||||
0x13, 0xa8, 0x4b, 0x57, 0xad, 0x05, 0x11, 0x37, 0x25, 0x74, 0xe5, 0xa6, 0xa6, 0x93, 0x21, 0x19,
|
||||
0xb4, 0x99, 0x71, 0x32, 0x95, 0xf4, 0x71, 0x7c, 0x10, 0xc1, 0xa5, 0x4b, 0x1f, 0x41, 0xe2, 0x8b,
|
||||
0xc8, 0x24, 0x8d, 0x99, 0x85, 0xd6, 0x4d, 0x38, 0xb9, 0x7c, 0xe7, 0x70, 0xee, 0x4d, 0xe0, 0x48,
|
||||
0x49, 0xea, 0x45, 0xe6, 0xa1, 0xd7, 0x92, 0xa5, 0x44, 0x2a, 0xa1, 0x05, 0xee, 0x68, 0x96, 0x84,
|
||||
0x4c, 0x2d, 0x79, 0xa2, 0x89, 0x92, 0x94, 0x18, 0xc0, 0x39, 0x0e, 0x16, 0x94, 0x97, 0x98, 0x0d,
|
||||
0x3b, 0x7d, 0x1d, 0x73, 0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0x74, 0x37, 0x8c, 0xb8, 0x8e, 0x57, 0x0b, 0x42, 0xc5, 0xd2, 0xab, 0x53, 0x6c, 0x59,
|
||||
0xfd, 0x46, 0x97, 0x54, 0x28, 0x66, 0xc4, 0x62, 0xb7, 0xf8, 0xea, 0x17, 0xdf, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0x21, 0xfc, 0xde, 0xc4, 0x62, 0x02, 0x00, 0x00,
|
||||
// 317 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x29, 0x2a, 0x48, 0xd6,
|
||||
0x4f, 0x07, 0x11, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xc2,
|
||||
0x25, 0xa9, 0x79, 0x29, 0xa9, 0x45, 0xb9, 0x99, 0x79, 0x25, 0x7a, 0x45, 0x05, 0xc9, 0x7a, 0x20,
|
||||
0x05, 0x52, 0x62, 0x89, 0x49, 0xc9, 0x99, 0x10, 0x65, 0xc8, 0x8a, 0x95, 0x78, 0xb9, 0xb8, 0x83,
|
||||
0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x02, 0x32, 0xf3, 0xd2, 0x95, 0x54, 0xb8, 0x84, 0xa0, 0x5c,
|
||||
0xa7, 0xa2, 0xfc, 0xc4, 0x94, 0xe4, 0xc4, 0xe2, 0x92, 0x90, 0x0a, 0x21, 0x3e, 0x2e, 0xa6, 0x92,
|
||||
0x0a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x9e, 0x20, 0xa6, 0x92, 0x0a, 0x25, 0x3e, 0x2e, 0x9e, 0xa0,
|
||||
0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xb0, 0xae, 0x85, 0x8c, 0x5c, 0xc2, 0x30, 0x01, 0x64,
|
||||
0x7d, 0x8e, 0x5c, 0x1c, 0xc9, 0x19, 0xa9, 0xc9, 0xd9, 0xf1, 0x50, 0xdd, 0xdc, 0x46, 0x6a, 0x7a,
|
||||
0x48, 0x8e, 0x03, 0x39, 0x49, 0x0f, 0xe2, 0x18, 0x98, 0x6e, 0x67, 0x90, 0xf2, 0x90, 0x8a, 0x20,
|
||||
0xf6, 0x64, 0x08, 0x43, 0xc8, 0x9d, 0x8b, 0x2b, 0x25, 0x35, 0x27, 0xb3, 0x2c, 0xb5, 0x08, 0x64,
|
||||
0x08, 0x13, 0xd8, 0x10, 0x0d, 0x02, 0x86, 0xb8, 0x40, 0x34, 0x84, 0x54, 0x04, 0x71, 0xa6, 0xc0,
|
||||
0x98, 0x46, 0x7b, 0x19, 0xb9, 0x78, 0xe0, 0x6e, 0x73, 0x0c, 0xf0, 0x14, 0xf2, 0xe6, 0x62, 0x01,
|
||||
0x39, 0x5e, 0x48, 0x41, 0x0f, 0x4b, 0x78, 0xe9, 0x21, 0x05, 0x8a, 0x94, 0x22, 0x0e, 0x15, 0x88,
|
||||
0x10, 0x10, 0x4a, 0xe0, 0xe2, 0x46, 0xf6, 0xb8, 0x3a, 0x3e, 0x33, 0x91, 0x14, 0x4a, 0x69, 0xe0,
|
||||
0x35, 0x1a, 0x49, 0xa5, 0x93, 0xcf, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78,
|
||||
0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 0x44,
|
||||
0x19, 0xa5, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x23, 0x4c, 0x43, 0x66,
|
||||
0xc2, 0x92, 0x89, 0x75, 0x72, 0x7e, 0x51, 0x2a, 0x88, 0x91, 0xc4, 0x06, 0x8e, 0x7d, 0x63, 0x40,
|
||||
0x00, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x5d, 0xfe, 0x6b, 0x42, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -385,10 +364,6 @@ func (m *RequestPing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
@@ -412,10 +387,6 @@ func (m *RequestBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if len(m.Tx) > 0 {
|
||||
i -= len(m.Tx)
|
||||
copy(dAtA[i:], m.Tx)
|
||||
@@ -446,10 +417,6 @@ func (m *ResponsePing) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
@@ -473,10 +440,6 @@ func (m *ResponseBroadcastTx) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
i -= len(m.XXX_unrecognized)
|
||||
copy(dAtA[i:], m.XXX_unrecognized)
|
||||
}
|
||||
if m.DeliverTx != nil {
|
||||
{
|
||||
size, err := m.DeliverTx.MarshalToSizedBuffer(dAtA[:i])
|
||||
@@ -521,9 +484,6 @@ func (m *RequestPing) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -537,9 +497,6 @@ func (m *RequestBroadcastTx) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -549,9 +506,6 @@ func (m *ResponsePing) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -569,9 +523,6 @@ func (m *ResponseBroadcastTx) Size() (n int) {
|
||||
l = m.DeliverTx.Size()
|
||||
n += 1 + l + sovTypes(uint64(l))
|
||||
}
|
||||
if m.XXX_unrecognized != nil {
|
||||
n += len(m.XXX_unrecognized)
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -625,7 +576,6 @@ func (m *RequestPing) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@@ -713,7 +663,6 @@ func (m *RequestBroadcastTx) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@@ -767,7 +716,6 @@ func (m *ResponsePing) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
@@ -893,7 +841,6 @@ func (m *ResponseBroadcastTx) Unmarshal(dAtA []byte) error {
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,6 @@ package tendermint.rpc.grpc;
|
||||
option go_package = "github.com/tendermint/tendermint/rpc/grpc;coregrpc";
|
||||
|
||||
import "abci/types/types.proto";
|
||||
import "third_party/proto/gogoproto/gogo.proto";
|
||||
|
||||
option (gogoproto.marshaler_all) = true;
|
||||
option (gogoproto.unmarshaler_all) = true;
|
||||
option (gogoproto.sizer_all) = true;
|
||||
option (gogoproto.goproto_registration) = true;
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
// Request types
|
||||
|
||||
Reference in New Issue
Block a user