github.com/Finschia/finschia-sdk@v0.48.1/x/evidence/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/evidence/v1beta1/tx.proto 3 4 package types 5 6 import ( 7 bytes "bytes" 8 context "context" 9 fmt "fmt" 10 types "github.com/Finschia/finschia-sdk/codec/types" 11 _ "github.com/gogo/protobuf/gogoproto" 12 grpc1 "github.com/gogo/protobuf/grpc" 13 proto "github.com/gogo/protobuf/proto" 14 _ "github.com/regen-network/cosmos-proto" 15 grpc "google.golang.org/grpc" 16 codes "google.golang.org/grpc/codes" 17 status "google.golang.org/grpc/status" 18 io "io" 19 math "math" 20 math_bits "math/bits" 21 ) 22 23 // Reference imports to suppress errors if they are not otherwise used. 24 var _ = proto.Marshal 25 var _ = fmt.Errorf 26 var _ = math.Inf 27 28 // This is a compile-time assertion to ensure that this generated file 29 // is compatible with the proto package it is being compiled against. 30 // A compilation error at this line likely means your copy of the 31 // proto package needs to be updated. 32 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 33 34 // MsgSubmitEvidence represents a message that supports submitting arbitrary 35 // Evidence of misbehavior such as equivocation or counterfactual signing. 36 type MsgSubmitEvidence struct { 37 Submitter string `protobuf:"bytes,1,opt,name=submitter,proto3" json:"submitter,omitempty"` 38 Evidence *types.Any `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` 39 } 40 41 func (m *MsgSubmitEvidence) Reset() { *m = MsgSubmitEvidence{} } 42 func (m *MsgSubmitEvidence) String() string { return proto.CompactTextString(m) } 43 func (*MsgSubmitEvidence) ProtoMessage() {} 44 func (*MsgSubmitEvidence) Descriptor() ([]byte, []int) { 45 return fileDescriptor_3e3242cb23c956e0, []int{0} 46 } 47 func (m *MsgSubmitEvidence) XXX_Unmarshal(b []byte) error { 48 return m.Unmarshal(b) 49 } 50 func (m *MsgSubmitEvidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 51 if deterministic { 52 return xxx_messageInfo_MsgSubmitEvidence.Marshal(b, m, deterministic) 53 } else { 54 b = b[:cap(b)] 55 n, err := m.MarshalToSizedBuffer(b) 56 if err != nil { 57 return nil, err 58 } 59 return b[:n], nil 60 } 61 } 62 func (m *MsgSubmitEvidence) XXX_Merge(src proto.Message) { 63 xxx_messageInfo_MsgSubmitEvidence.Merge(m, src) 64 } 65 func (m *MsgSubmitEvidence) XXX_Size() int { 66 return m.Size() 67 } 68 func (m *MsgSubmitEvidence) XXX_DiscardUnknown() { 69 xxx_messageInfo_MsgSubmitEvidence.DiscardUnknown(m) 70 } 71 72 var xxx_messageInfo_MsgSubmitEvidence proto.InternalMessageInfo 73 74 // MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. 75 type MsgSubmitEvidenceResponse struct { 76 // hash defines the hash of the evidence. 77 Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` 78 } 79 80 func (m *MsgSubmitEvidenceResponse) Reset() { *m = MsgSubmitEvidenceResponse{} } 81 func (m *MsgSubmitEvidenceResponse) String() string { return proto.CompactTextString(m) } 82 func (*MsgSubmitEvidenceResponse) ProtoMessage() {} 83 func (*MsgSubmitEvidenceResponse) Descriptor() ([]byte, []int) { 84 return fileDescriptor_3e3242cb23c956e0, []int{1} 85 } 86 func (m *MsgSubmitEvidenceResponse) XXX_Unmarshal(b []byte) error { 87 return m.Unmarshal(b) 88 } 89 func (m *MsgSubmitEvidenceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 90 if deterministic { 91 return xxx_messageInfo_MsgSubmitEvidenceResponse.Marshal(b, m, deterministic) 92 } else { 93 b = b[:cap(b)] 94 n, err := m.MarshalToSizedBuffer(b) 95 if err != nil { 96 return nil, err 97 } 98 return b[:n], nil 99 } 100 } 101 func (m *MsgSubmitEvidenceResponse) XXX_Merge(src proto.Message) { 102 xxx_messageInfo_MsgSubmitEvidenceResponse.Merge(m, src) 103 } 104 func (m *MsgSubmitEvidenceResponse) XXX_Size() int { 105 return m.Size() 106 } 107 func (m *MsgSubmitEvidenceResponse) XXX_DiscardUnknown() { 108 xxx_messageInfo_MsgSubmitEvidenceResponse.DiscardUnknown(m) 109 } 110 111 var xxx_messageInfo_MsgSubmitEvidenceResponse proto.InternalMessageInfo 112 113 func (m *MsgSubmitEvidenceResponse) GetHash() []byte { 114 if m != nil { 115 return m.Hash 116 } 117 return nil 118 } 119 120 func init() { 121 proto.RegisterType((*MsgSubmitEvidence)(nil), "cosmos.evidence.v1beta1.MsgSubmitEvidence") 122 proto.RegisterType((*MsgSubmitEvidenceResponse)(nil), "cosmos.evidence.v1beta1.MsgSubmitEvidenceResponse") 123 } 124 125 func init() { proto.RegisterFile("cosmos/evidence/v1beta1/tx.proto", fileDescriptor_3e3242cb23c956e0) } 126 127 var fileDescriptor_3e3242cb23c956e0 = []byte{ 128 // 325 bytes of a gzipped FileDescriptorProto 129 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xce, 0x2f, 0xce, 130 0xcd, 0x2f, 0xd6, 0x4f, 0x2d, 0xcb, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0x2f, 0x33, 0x4c, 0x4a, 131 0x2d, 0x49, 0x34, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x87, 0xa8, 132 0xd0, 0x83, 0xa9, 0xd0, 0x83, 0xaa, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xab, 0xd1, 0x07, 133 0xb1, 0x20, 0xca, 0xa5, 0x24, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xbc, 0xa4, 0xd2, 134 0x34, 0xfd, 0xc4, 0xbc, 0x4a, 0x98, 0x14, 0xc4, 0xa4, 0x78, 0x88, 0x1e, 0xa8, 0xb1, 0x60, 0x8e, 135 0x52, 0x35, 0x97, 0xa0, 0x6f, 0x71, 0x7a, 0x70, 0x69, 0x52, 0x6e, 0x66, 0x89, 0x2b, 0xd4, 0x22, 136 0x21, 0x19, 0x2e, 0xce, 0x62, 0xb0, 0x48, 0x49, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 137 0x10, 0x42, 0x40, 0xc8, 0x8e, 0x8b, 0x03, 0xe6, 0x24, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 138 0x11, 0x3d, 0x88, 0xdd, 0x7a, 0x30, 0xbb, 0xf5, 0x1c, 0xf3, 0x2a, 0x9d, 0x78, 0x4e, 0x6d, 0xd1, 139 0xe5, 0x80, 0x99, 0x19, 0x04, 0xd7, 0x63, 0xc5, 0xd1, 0xb1, 0x40, 0x9e, 0xe1, 0xc5, 0x02, 0x79, 140 0x06, 0x25, 0x7d, 0x2e, 0x49, 0x0c, 0xcb, 0x83, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 141 0x84, 0xb8, 0x58, 0x32, 0x12, 0x8b, 0x33, 0x24, 0x58, 0x14, 0x18, 0x35, 0x78, 0x82, 0xc0, 0x6c, 142 0xa3, 0x72, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0xa1, 0x02, 0x2e, 0x3e, 0x34, 0x17, 0x6b, 0xe9, 0xe1, 143 0x08, 0x2c, 0x3d, 0x0c, 0x0b, 0xa4, 0x8c, 0x88, 0x57, 0x0b, 0x73, 0x8c, 0x93, 0xff, 0x8a, 0x47, 144 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 145 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x98, 0x9e, 0x59, 146 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0xef, 0x96, 0x99, 0x57, 0x9c, 0x9c, 0x91, 0x99, 147 0xa8, 0x9f, 0x06, 0x65, 0xe8, 0x16, 0xa7, 0x64, 0xeb, 0x57, 0x20, 0xe2, 0xb9, 0xa4, 0xb2, 0x20, 148 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x54, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x20, 0xf0, 0xff, 149 0x1e, 0x07, 0x02, 0x00, 0x00, 150 } 151 152 func (this *MsgSubmitEvidenceResponse) Equal(that interface{}) bool { 153 if that == nil { 154 return this == nil 155 } 156 157 that1, ok := that.(*MsgSubmitEvidenceResponse) 158 if !ok { 159 that2, ok := that.(MsgSubmitEvidenceResponse) 160 if ok { 161 that1 = &that2 162 } else { 163 return false 164 } 165 } 166 if that1 == nil { 167 return this == nil 168 } else if this == nil { 169 return false 170 } 171 if !bytes.Equal(this.Hash, that1.Hash) { 172 return false 173 } 174 return true 175 } 176 177 // Reference imports to suppress errors if they are not otherwise used. 178 var _ context.Context 179 var _ grpc.ClientConn 180 181 // This is a compile-time assertion to ensure that this generated file 182 // is compatible with the grpc package it is being compiled against. 183 const _ = grpc.SupportPackageIsVersion4 184 185 // MsgClient is the client API for Msg service. 186 // 187 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 188 type MsgClient interface { 189 // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or 190 // counterfactual signing. 191 SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, opts ...grpc.CallOption) (*MsgSubmitEvidenceResponse, error) 192 } 193 194 type msgClient struct { 195 cc grpc1.ClientConn 196 } 197 198 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 199 return &msgClient{cc} 200 } 201 202 func (c *msgClient) SubmitEvidence(ctx context.Context, in *MsgSubmitEvidence, opts ...grpc.CallOption) (*MsgSubmitEvidenceResponse, error) { 203 out := new(MsgSubmitEvidenceResponse) 204 err := c.cc.Invoke(ctx, "/cosmos.evidence.v1beta1.Msg/SubmitEvidence", in, out, opts...) 205 if err != nil { 206 return nil, err 207 } 208 return out, nil 209 } 210 211 // MsgServer is the server API for Msg service. 212 type MsgServer interface { 213 // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or 214 // counterfactual signing. 215 SubmitEvidence(context.Context, *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) 216 } 217 218 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 219 type UnimplementedMsgServer struct { 220 } 221 222 func (*UnimplementedMsgServer) SubmitEvidence(ctx context.Context, req *MsgSubmitEvidence) (*MsgSubmitEvidenceResponse, error) { 223 return nil, status.Errorf(codes.Unimplemented, "method SubmitEvidence not implemented") 224 } 225 226 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 227 s.RegisterService(&_Msg_serviceDesc, srv) 228 } 229 230 func _Msg_SubmitEvidence_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 231 in := new(MsgSubmitEvidence) 232 if err := dec(in); err != nil { 233 return nil, err 234 } 235 if interceptor == nil { 236 return srv.(MsgServer).SubmitEvidence(ctx, in) 237 } 238 info := &grpc.UnaryServerInfo{ 239 Server: srv, 240 FullMethod: "/cosmos.evidence.v1beta1.Msg/SubmitEvidence", 241 } 242 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 243 return srv.(MsgServer).SubmitEvidence(ctx, req.(*MsgSubmitEvidence)) 244 } 245 return interceptor(ctx, in, info, handler) 246 } 247 248 var _Msg_serviceDesc = grpc.ServiceDesc{ 249 ServiceName: "cosmos.evidence.v1beta1.Msg", 250 HandlerType: (*MsgServer)(nil), 251 Methods: []grpc.MethodDesc{ 252 { 253 MethodName: "SubmitEvidence", 254 Handler: _Msg_SubmitEvidence_Handler, 255 }, 256 }, 257 Streams: []grpc.StreamDesc{}, 258 Metadata: "cosmos/evidence/v1beta1/tx.proto", 259 } 260 261 func (m *MsgSubmitEvidence) Marshal() (dAtA []byte, err error) { 262 size := m.Size() 263 dAtA = make([]byte, size) 264 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 265 if err != nil { 266 return nil, err 267 } 268 return dAtA[:n], nil 269 } 270 271 func (m *MsgSubmitEvidence) MarshalTo(dAtA []byte) (int, error) { 272 size := m.Size() 273 return m.MarshalToSizedBuffer(dAtA[:size]) 274 } 275 276 func (m *MsgSubmitEvidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { 277 i := len(dAtA) 278 _ = i 279 var l int 280 _ = l 281 if m.Evidence != nil { 282 { 283 size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) 284 if err != nil { 285 return 0, err 286 } 287 i -= size 288 i = encodeVarintTx(dAtA, i, uint64(size)) 289 } 290 i-- 291 dAtA[i] = 0x12 292 } 293 if len(m.Submitter) > 0 { 294 i -= len(m.Submitter) 295 copy(dAtA[i:], m.Submitter) 296 i = encodeVarintTx(dAtA, i, uint64(len(m.Submitter))) 297 i-- 298 dAtA[i] = 0xa 299 } 300 return len(dAtA) - i, nil 301 } 302 303 func (m *MsgSubmitEvidenceResponse) Marshal() (dAtA []byte, err error) { 304 size := m.Size() 305 dAtA = make([]byte, size) 306 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 307 if err != nil { 308 return nil, err 309 } 310 return dAtA[:n], nil 311 } 312 313 func (m *MsgSubmitEvidenceResponse) MarshalTo(dAtA []byte) (int, error) { 314 size := m.Size() 315 return m.MarshalToSizedBuffer(dAtA[:size]) 316 } 317 318 func (m *MsgSubmitEvidenceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 319 i := len(dAtA) 320 _ = i 321 var l int 322 _ = l 323 if len(m.Hash) > 0 { 324 i -= len(m.Hash) 325 copy(dAtA[i:], m.Hash) 326 i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) 327 i-- 328 dAtA[i] = 0x22 329 } 330 return len(dAtA) - i, nil 331 } 332 333 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 334 offset -= sovTx(v) 335 base := offset 336 for v >= 1<<7 { 337 dAtA[offset] = uint8(v&0x7f | 0x80) 338 v >>= 7 339 offset++ 340 } 341 dAtA[offset] = uint8(v) 342 return base 343 } 344 func (m *MsgSubmitEvidence) Size() (n int) { 345 if m == nil { 346 return 0 347 } 348 var l int 349 _ = l 350 l = len(m.Submitter) 351 if l > 0 { 352 n += 1 + l + sovTx(uint64(l)) 353 } 354 if m.Evidence != nil { 355 l = m.Evidence.Size() 356 n += 1 + l + sovTx(uint64(l)) 357 } 358 return n 359 } 360 361 func (m *MsgSubmitEvidenceResponse) Size() (n int) { 362 if m == nil { 363 return 0 364 } 365 var l int 366 _ = l 367 l = len(m.Hash) 368 if l > 0 { 369 n += 1 + l + sovTx(uint64(l)) 370 } 371 return n 372 } 373 374 func sovTx(x uint64) (n int) { 375 return (math_bits.Len64(x|1) + 6) / 7 376 } 377 func sozTx(x uint64) (n int) { 378 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 379 } 380 func (m *MsgSubmitEvidence) Unmarshal(dAtA []byte) error { 381 l := len(dAtA) 382 iNdEx := 0 383 for iNdEx < l { 384 preIndex := iNdEx 385 var wire uint64 386 for shift := uint(0); ; shift += 7 { 387 if shift >= 64 { 388 return ErrIntOverflowTx 389 } 390 if iNdEx >= l { 391 return io.ErrUnexpectedEOF 392 } 393 b := dAtA[iNdEx] 394 iNdEx++ 395 wire |= uint64(b&0x7F) << shift 396 if b < 0x80 { 397 break 398 } 399 } 400 fieldNum := int32(wire >> 3) 401 wireType := int(wire & 0x7) 402 if wireType == 4 { 403 return fmt.Errorf("proto: MsgSubmitEvidence: wiretype end group for non-group") 404 } 405 if fieldNum <= 0 { 406 return fmt.Errorf("proto: MsgSubmitEvidence: illegal tag %d (wire type %d)", fieldNum, wire) 407 } 408 switch fieldNum { 409 case 1: 410 if wireType != 2 { 411 return fmt.Errorf("proto: wrong wireType = %d for field Submitter", wireType) 412 } 413 var stringLen uint64 414 for shift := uint(0); ; shift += 7 { 415 if shift >= 64 { 416 return ErrIntOverflowTx 417 } 418 if iNdEx >= l { 419 return io.ErrUnexpectedEOF 420 } 421 b := dAtA[iNdEx] 422 iNdEx++ 423 stringLen |= uint64(b&0x7F) << shift 424 if b < 0x80 { 425 break 426 } 427 } 428 intStringLen := int(stringLen) 429 if intStringLen < 0 { 430 return ErrInvalidLengthTx 431 } 432 postIndex := iNdEx + intStringLen 433 if postIndex < 0 { 434 return ErrInvalidLengthTx 435 } 436 if postIndex > l { 437 return io.ErrUnexpectedEOF 438 } 439 m.Submitter = string(dAtA[iNdEx:postIndex]) 440 iNdEx = postIndex 441 case 2: 442 if wireType != 2 { 443 return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) 444 } 445 var msglen int 446 for shift := uint(0); ; shift += 7 { 447 if shift >= 64 { 448 return ErrIntOverflowTx 449 } 450 if iNdEx >= l { 451 return io.ErrUnexpectedEOF 452 } 453 b := dAtA[iNdEx] 454 iNdEx++ 455 msglen |= int(b&0x7F) << shift 456 if b < 0x80 { 457 break 458 } 459 } 460 if msglen < 0 { 461 return ErrInvalidLengthTx 462 } 463 postIndex := iNdEx + msglen 464 if postIndex < 0 { 465 return ErrInvalidLengthTx 466 } 467 if postIndex > l { 468 return io.ErrUnexpectedEOF 469 } 470 if m.Evidence == nil { 471 m.Evidence = &types.Any{} 472 } 473 if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 474 return err 475 } 476 iNdEx = postIndex 477 default: 478 iNdEx = preIndex 479 skippy, err := skipTx(dAtA[iNdEx:]) 480 if err != nil { 481 return err 482 } 483 if (skippy < 0) || (iNdEx+skippy) < 0 { 484 return ErrInvalidLengthTx 485 } 486 if (iNdEx + skippy) > l { 487 return io.ErrUnexpectedEOF 488 } 489 iNdEx += skippy 490 } 491 } 492 493 if iNdEx > l { 494 return io.ErrUnexpectedEOF 495 } 496 return nil 497 } 498 func (m *MsgSubmitEvidenceResponse) Unmarshal(dAtA []byte) error { 499 l := len(dAtA) 500 iNdEx := 0 501 for iNdEx < l { 502 preIndex := iNdEx 503 var wire uint64 504 for shift := uint(0); ; shift += 7 { 505 if shift >= 64 { 506 return ErrIntOverflowTx 507 } 508 if iNdEx >= l { 509 return io.ErrUnexpectedEOF 510 } 511 b := dAtA[iNdEx] 512 iNdEx++ 513 wire |= uint64(b&0x7F) << shift 514 if b < 0x80 { 515 break 516 } 517 } 518 fieldNum := int32(wire >> 3) 519 wireType := int(wire & 0x7) 520 if wireType == 4 { 521 return fmt.Errorf("proto: MsgSubmitEvidenceResponse: wiretype end group for non-group") 522 } 523 if fieldNum <= 0 { 524 return fmt.Errorf("proto: MsgSubmitEvidenceResponse: illegal tag %d (wire type %d)", fieldNum, wire) 525 } 526 switch fieldNum { 527 case 4: 528 if wireType != 2 { 529 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 530 } 531 var byteLen int 532 for shift := uint(0); ; shift += 7 { 533 if shift >= 64 { 534 return ErrIntOverflowTx 535 } 536 if iNdEx >= l { 537 return io.ErrUnexpectedEOF 538 } 539 b := dAtA[iNdEx] 540 iNdEx++ 541 byteLen |= int(b&0x7F) << shift 542 if b < 0x80 { 543 break 544 } 545 } 546 if byteLen < 0 { 547 return ErrInvalidLengthTx 548 } 549 postIndex := iNdEx + byteLen 550 if postIndex < 0 { 551 return ErrInvalidLengthTx 552 } 553 if postIndex > l { 554 return io.ErrUnexpectedEOF 555 } 556 m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) 557 if m.Hash == nil { 558 m.Hash = []byte{} 559 } 560 iNdEx = postIndex 561 default: 562 iNdEx = preIndex 563 skippy, err := skipTx(dAtA[iNdEx:]) 564 if err != nil { 565 return err 566 } 567 if (skippy < 0) || (iNdEx+skippy) < 0 { 568 return ErrInvalidLengthTx 569 } 570 if (iNdEx + skippy) > l { 571 return io.ErrUnexpectedEOF 572 } 573 iNdEx += skippy 574 } 575 } 576 577 if iNdEx > l { 578 return io.ErrUnexpectedEOF 579 } 580 return nil 581 } 582 func skipTx(dAtA []byte) (n int, err error) { 583 l := len(dAtA) 584 iNdEx := 0 585 depth := 0 586 for iNdEx < l { 587 var wire uint64 588 for shift := uint(0); ; shift += 7 { 589 if shift >= 64 { 590 return 0, ErrIntOverflowTx 591 } 592 if iNdEx >= l { 593 return 0, io.ErrUnexpectedEOF 594 } 595 b := dAtA[iNdEx] 596 iNdEx++ 597 wire |= (uint64(b) & 0x7F) << shift 598 if b < 0x80 { 599 break 600 } 601 } 602 wireType := int(wire & 0x7) 603 switch wireType { 604 case 0: 605 for shift := uint(0); ; shift += 7 { 606 if shift >= 64 { 607 return 0, ErrIntOverflowTx 608 } 609 if iNdEx >= l { 610 return 0, io.ErrUnexpectedEOF 611 } 612 iNdEx++ 613 if dAtA[iNdEx-1] < 0x80 { 614 break 615 } 616 } 617 case 1: 618 iNdEx += 8 619 case 2: 620 var length int 621 for shift := uint(0); ; shift += 7 { 622 if shift >= 64 { 623 return 0, ErrIntOverflowTx 624 } 625 if iNdEx >= l { 626 return 0, io.ErrUnexpectedEOF 627 } 628 b := dAtA[iNdEx] 629 iNdEx++ 630 length |= (int(b) & 0x7F) << shift 631 if b < 0x80 { 632 break 633 } 634 } 635 if length < 0 { 636 return 0, ErrInvalidLengthTx 637 } 638 iNdEx += length 639 case 3: 640 depth++ 641 case 4: 642 if depth == 0 { 643 return 0, ErrUnexpectedEndOfGroupTx 644 } 645 depth-- 646 case 5: 647 iNdEx += 4 648 default: 649 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 650 } 651 if iNdEx < 0 { 652 return 0, ErrInvalidLengthTx 653 } 654 if depth == 0 { 655 return iNdEx, nil 656 } 657 } 658 return 0, io.ErrUnexpectedEOF 659 } 660 661 var ( 662 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 663 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 664 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 665 )