github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/proto/tendermint/types/block.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/types/block.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 type Block struct { 27 Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` 28 Data Data `protobuf:"bytes,2,opt,name=data,proto3" json:"data"` 29 Evidence EvidenceList `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence"` 30 LastCommit *Commit `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` 31 } 32 33 func (m *Block) Reset() { *m = Block{} } 34 func (m *Block) String() string { return proto.CompactTextString(m) } 35 func (*Block) ProtoMessage() {} 36 func (*Block) Descriptor() ([]byte, []int) { 37 return fileDescriptor_70840e82f4357ab1, []int{0} 38 } 39 func (m *Block) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_Block.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *Block) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_Block.Merge(m, src) 56 } 57 func (m *Block) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *Block) XXX_DiscardUnknown() { 61 xxx_messageInfo_Block.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_Block proto.InternalMessageInfo 65 66 func (m *Block) GetHeader() Header { 67 if m != nil { 68 return m.Header 69 } 70 return Header{} 71 } 72 73 func (m *Block) GetData() Data { 74 if m != nil { 75 return m.Data 76 } 77 return Data{} 78 } 79 80 func (m *Block) GetEvidence() EvidenceList { 81 if m != nil { 82 return m.Evidence 83 } 84 return EvidenceList{} 85 } 86 87 func (m *Block) GetLastCommit() *Commit { 88 if m != nil { 89 return m.LastCommit 90 } 91 return nil 92 } 93 94 func init() { 95 proto.RegisterType((*Block)(nil), "seitendermint.types.Block") 96 } 97 98 func init() { proto.RegisterFile("tendermint/types/block.proto", fileDescriptor_70840e82f4357ab1) } 99 100 var fileDescriptor_70840e82f4357ab1 = []byte{ 101 // 276 bytes of a gzipped FileDescriptorProto 102 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x49, 0xcd, 0x4b, 103 0x49, 0x2d, 0xca, 0xcd, 0xcc, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xca, 0xc9, 104 0x4f, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x2e, 0x4e, 0xcd, 0x44, 0x28, 0xd0, 105 0x03, 0x2b, 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xeb, 0x83, 0x58, 0x10, 0xa5, 0x52, 106 0x98, 0x06, 0x81, 0x49, 0x88, 0xac, 0xd2, 0x2f, 0x46, 0x2e, 0x56, 0x27, 0x90, 0xc1, 0x42, 0x96, 107 0x5c, 0x6c, 0x19, 0xa9, 0x89, 0x29, 0xa9, 0x45, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0xd2, 108 0x7a, 0x58, 0xec, 0xd0, 0xf3, 0x00, 0x2b, 0x71, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 109 0x41, 0xc8, 0x98, 0x8b, 0x25, 0x25, 0xb1, 0x24, 0x51, 0x82, 0x09, 0xac, 0x51, 0x12, 0xab, 0x46, 110 0x97, 0xc4, 0x92, 0x44, 0xa8, 0x36, 0xb0, 0x62, 0x21, 0x67, 0x2e, 0x8e, 0xd4, 0xb2, 0xcc, 0x94, 111 0xd4, 0xbc, 0xe4, 0x54, 0x09, 0x66, 0xb0, 0x46, 0x45, 0xac, 0x1a, 0x5d, 0xa1, 0x8a, 0x7c, 0x32, 112 0x8b, 0x4b, 0xa0, 0x06, 0xc0, 0x35, 0x0a, 0xd9, 0x70, 0x71, 0xe7, 0x24, 0x16, 0x97, 0xc4, 0x27, 113 0xe7, 0xe7, 0xe6, 0x66, 0x96, 0x48, 0xb0, 0xe0, 0x71, 0xb9, 0x33, 0x58, 0x49, 0x10, 0x17, 0x48, 114 0x3d, 0x84, 0xed, 0x14, 0x7a, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 115 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0xd6, 116 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x89, 0x45, 0x99, 0xba, 0x89, 117 0x79, 0xc9, 0x19, 0xf9, 0x45, 0xfa, 0xc5, 0xa9, 0x99, 0xba, 0x48, 0xc1, 0x09, 0x09, 0x6b, 0xf4, 118 0xf0, 0x4d, 0x62, 0x03, 0x8b, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x36, 0xe5, 0xdb, 119 0xc3, 0x01, 0x00, 0x00, 120 } 121 122 func (m *Block) Marshal() (dAtA []byte, err error) { 123 size := m.Size() 124 dAtA = make([]byte, size) 125 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 126 if err != nil { 127 return nil, err 128 } 129 return dAtA[:n], nil 130 } 131 132 func (m *Block) MarshalTo(dAtA []byte) (int, error) { 133 size := m.Size() 134 return m.MarshalToSizedBuffer(dAtA[:size]) 135 } 136 137 func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error) { 138 i := len(dAtA) 139 _ = i 140 var l int 141 _ = l 142 if m.LastCommit != nil { 143 { 144 size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) 145 if err != nil { 146 return 0, err 147 } 148 i -= size 149 i = encodeVarintBlock(dAtA, i, uint64(size)) 150 } 151 i-- 152 dAtA[i] = 0x22 153 } 154 { 155 size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) 156 if err != nil { 157 return 0, err 158 } 159 i -= size 160 i = encodeVarintBlock(dAtA, i, uint64(size)) 161 } 162 i-- 163 dAtA[i] = 0x1a 164 { 165 size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) 166 if err != nil { 167 return 0, err 168 } 169 i -= size 170 i = encodeVarintBlock(dAtA, i, uint64(size)) 171 } 172 i-- 173 dAtA[i] = 0x12 174 { 175 size, err := m.Header.MarshalToSizedBuffer(dAtA[:i]) 176 if err != nil { 177 return 0, err 178 } 179 i -= size 180 i = encodeVarintBlock(dAtA, i, uint64(size)) 181 } 182 i-- 183 dAtA[i] = 0xa 184 return len(dAtA) - i, nil 185 } 186 187 func encodeVarintBlock(dAtA []byte, offset int, v uint64) int { 188 offset -= sovBlock(v) 189 base := offset 190 for v >= 1<<7 { 191 dAtA[offset] = uint8(v&0x7f | 0x80) 192 v >>= 7 193 offset++ 194 } 195 dAtA[offset] = uint8(v) 196 return base 197 } 198 func (m *Block) Size() (n int) { 199 if m == nil { 200 return 0 201 } 202 var l int 203 _ = l 204 l = m.Header.Size() 205 n += 1 + l + sovBlock(uint64(l)) 206 l = m.Data.Size() 207 n += 1 + l + sovBlock(uint64(l)) 208 l = m.Evidence.Size() 209 n += 1 + l + sovBlock(uint64(l)) 210 if m.LastCommit != nil { 211 l = m.LastCommit.Size() 212 n += 1 + l + sovBlock(uint64(l)) 213 } 214 return n 215 } 216 217 func sovBlock(x uint64) (n int) { 218 return (math_bits.Len64(x|1) + 6) / 7 219 } 220 func sozBlock(x uint64) (n int) { 221 return sovBlock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 222 } 223 func (m *Block) Unmarshal(dAtA []byte) error { 224 l := len(dAtA) 225 iNdEx := 0 226 for iNdEx < l { 227 preIndex := iNdEx 228 var wire uint64 229 for shift := uint(0); ; shift += 7 { 230 if shift >= 64 { 231 return ErrIntOverflowBlock 232 } 233 if iNdEx >= l { 234 return io.ErrUnexpectedEOF 235 } 236 b := dAtA[iNdEx] 237 iNdEx++ 238 wire |= uint64(b&0x7F) << shift 239 if b < 0x80 { 240 break 241 } 242 } 243 fieldNum := int32(wire >> 3) 244 wireType := int(wire & 0x7) 245 if wireType == 4 { 246 return fmt.Errorf("proto: Block: wiretype end group for non-group") 247 } 248 if fieldNum <= 0 { 249 return fmt.Errorf("proto: Block: illegal tag %d (wire type %d)", fieldNum, wire) 250 } 251 switch fieldNum { 252 case 1: 253 if wireType != 2 { 254 return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType) 255 } 256 var msglen int 257 for shift := uint(0); ; shift += 7 { 258 if shift >= 64 { 259 return ErrIntOverflowBlock 260 } 261 if iNdEx >= l { 262 return io.ErrUnexpectedEOF 263 } 264 b := dAtA[iNdEx] 265 iNdEx++ 266 msglen |= int(b&0x7F) << shift 267 if b < 0x80 { 268 break 269 } 270 } 271 if msglen < 0 { 272 return ErrInvalidLengthBlock 273 } 274 postIndex := iNdEx + msglen 275 if postIndex < 0 { 276 return ErrInvalidLengthBlock 277 } 278 if postIndex > l { 279 return io.ErrUnexpectedEOF 280 } 281 if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 282 return err 283 } 284 iNdEx = postIndex 285 case 2: 286 if wireType != 2 { 287 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 288 } 289 var msglen int 290 for shift := uint(0); ; shift += 7 { 291 if shift >= 64 { 292 return ErrIntOverflowBlock 293 } 294 if iNdEx >= l { 295 return io.ErrUnexpectedEOF 296 } 297 b := dAtA[iNdEx] 298 iNdEx++ 299 msglen |= int(b&0x7F) << shift 300 if b < 0x80 { 301 break 302 } 303 } 304 if msglen < 0 { 305 return ErrInvalidLengthBlock 306 } 307 postIndex := iNdEx + msglen 308 if postIndex < 0 { 309 return ErrInvalidLengthBlock 310 } 311 if postIndex > l { 312 return io.ErrUnexpectedEOF 313 } 314 if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 315 return err 316 } 317 iNdEx = postIndex 318 case 3: 319 if wireType != 2 { 320 return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) 321 } 322 var msglen int 323 for shift := uint(0); ; shift += 7 { 324 if shift >= 64 { 325 return ErrIntOverflowBlock 326 } 327 if iNdEx >= l { 328 return io.ErrUnexpectedEOF 329 } 330 b := dAtA[iNdEx] 331 iNdEx++ 332 msglen |= int(b&0x7F) << shift 333 if b < 0x80 { 334 break 335 } 336 } 337 if msglen < 0 { 338 return ErrInvalidLengthBlock 339 } 340 postIndex := iNdEx + msglen 341 if postIndex < 0 { 342 return ErrInvalidLengthBlock 343 } 344 if postIndex > l { 345 return io.ErrUnexpectedEOF 346 } 347 if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 348 return err 349 } 350 iNdEx = postIndex 351 case 4: 352 if wireType != 2 { 353 return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) 354 } 355 var msglen int 356 for shift := uint(0); ; shift += 7 { 357 if shift >= 64 { 358 return ErrIntOverflowBlock 359 } 360 if iNdEx >= l { 361 return io.ErrUnexpectedEOF 362 } 363 b := dAtA[iNdEx] 364 iNdEx++ 365 msglen |= int(b&0x7F) << shift 366 if b < 0x80 { 367 break 368 } 369 } 370 if msglen < 0 { 371 return ErrInvalidLengthBlock 372 } 373 postIndex := iNdEx + msglen 374 if postIndex < 0 { 375 return ErrInvalidLengthBlock 376 } 377 if postIndex > l { 378 return io.ErrUnexpectedEOF 379 } 380 if m.LastCommit == nil { 381 m.LastCommit = &Commit{} 382 } 383 if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 384 return err 385 } 386 iNdEx = postIndex 387 default: 388 iNdEx = preIndex 389 skippy, err := skipBlock(dAtA[iNdEx:]) 390 if err != nil { 391 return err 392 } 393 if (skippy < 0) || (iNdEx+skippy) < 0 { 394 return ErrInvalidLengthBlock 395 } 396 if (iNdEx + skippy) > l { 397 return io.ErrUnexpectedEOF 398 } 399 iNdEx += skippy 400 } 401 } 402 403 if iNdEx > l { 404 return io.ErrUnexpectedEOF 405 } 406 return nil 407 } 408 func skipBlock(dAtA []byte) (n int, err error) { 409 l := len(dAtA) 410 iNdEx := 0 411 depth := 0 412 for iNdEx < l { 413 var wire uint64 414 for shift := uint(0); ; shift += 7 { 415 if shift >= 64 { 416 return 0, ErrIntOverflowBlock 417 } 418 if iNdEx >= l { 419 return 0, io.ErrUnexpectedEOF 420 } 421 b := dAtA[iNdEx] 422 iNdEx++ 423 wire |= (uint64(b) & 0x7F) << shift 424 if b < 0x80 { 425 break 426 } 427 } 428 wireType := int(wire & 0x7) 429 switch wireType { 430 case 0: 431 for shift := uint(0); ; shift += 7 { 432 if shift >= 64 { 433 return 0, ErrIntOverflowBlock 434 } 435 if iNdEx >= l { 436 return 0, io.ErrUnexpectedEOF 437 } 438 iNdEx++ 439 if dAtA[iNdEx-1] < 0x80 { 440 break 441 } 442 } 443 case 1: 444 iNdEx += 8 445 case 2: 446 var length int 447 for shift := uint(0); ; shift += 7 { 448 if shift >= 64 { 449 return 0, ErrIntOverflowBlock 450 } 451 if iNdEx >= l { 452 return 0, io.ErrUnexpectedEOF 453 } 454 b := dAtA[iNdEx] 455 iNdEx++ 456 length |= (int(b) & 0x7F) << shift 457 if b < 0x80 { 458 break 459 } 460 } 461 if length < 0 { 462 return 0, ErrInvalidLengthBlock 463 } 464 iNdEx += length 465 case 3: 466 depth++ 467 case 4: 468 if depth == 0 { 469 return 0, ErrUnexpectedEndOfGroupBlock 470 } 471 depth-- 472 case 5: 473 iNdEx += 4 474 default: 475 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 476 } 477 if iNdEx < 0 { 478 return 0, ErrInvalidLengthBlock 479 } 480 if depth == 0 { 481 return iNdEx, nil 482 } 483 } 484 return 0, io.ErrUnexpectedEOF 485 } 486 487 var ( 488 ErrInvalidLengthBlock = fmt.Errorf("proto: negative length found during unmarshaling") 489 ErrIntOverflowBlock = fmt.Errorf("proto: integer overflow") 490 ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group") 491 )