github.com/supragya/TendermintConnector@v0.0.0-20210619045051-113e32b84fb1/chains/iris/proto/tendermint/crypto/proof.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/crypto/proof.proto 3 4 package crypto 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 Proof struct { 27 Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` 28 Index int64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` 29 LeafHash []byte `protobuf:"bytes,3,opt,name=leaf_hash,json=leafHash,proto3" json:"leaf_hash,omitempty"` 30 Aunts [][]byte `protobuf:"bytes,4,rep,name=aunts,proto3" json:"aunts,omitempty"` 31 } 32 33 func (m *Proof) Reset() { *m = Proof{} } 34 func (m *Proof) String() string { return proto.CompactTextString(m) } 35 func (*Proof) ProtoMessage() {} 36 func (*Proof) Descriptor() ([]byte, []int) { 37 return fileDescriptor_6b60b6ba2ab5b856, []int{0} 38 } 39 func (m *Proof) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_Proof.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 *Proof) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_Proof.Merge(m, src) 56 } 57 func (m *Proof) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *Proof) XXX_DiscardUnknown() { 61 xxx_messageInfo_Proof.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_Proof proto.InternalMessageInfo 65 66 func (m *Proof) GetTotal() int64 { 67 if m != nil { 68 return m.Total 69 } 70 return 0 71 } 72 73 func (m *Proof) GetIndex() int64 { 74 if m != nil { 75 return m.Index 76 } 77 return 0 78 } 79 80 func (m *Proof) GetLeafHash() []byte { 81 if m != nil { 82 return m.LeafHash 83 } 84 return nil 85 } 86 87 func (m *Proof) GetAunts() [][]byte { 88 if m != nil { 89 return m.Aunts 90 } 91 return nil 92 } 93 94 type ValueOp struct { 95 // Encoded in ProofOp.Key. 96 Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 97 // To encode in ProofOp.Data 98 Proof *Proof `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` 99 } 100 101 func (m *ValueOp) Reset() { *m = ValueOp{} } 102 func (m *ValueOp) String() string { return proto.CompactTextString(m) } 103 func (*ValueOp) ProtoMessage() {} 104 func (*ValueOp) Descriptor() ([]byte, []int) { 105 return fileDescriptor_6b60b6ba2ab5b856, []int{1} 106 } 107 func (m *ValueOp) XXX_Unmarshal(b []byte) error { 108 return m.Unmarshal(b) 109 } 110 func (m *ValueOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 111 if deterministic { 112 return xxx_messageInfo_ValueOp.Marshal(b, m, deterministic) 113 } else { 114 b = b[:cap(b)] 115 n, err := m.MarshalToSizedBuffer(b) 116 if err != nil { 117 return nil, err 118 } 119 return b[:n], nil 120 } 121 } 122 func (m *ValueOp) XXX_Merge(src proto.Message) { 123 xxx_messageInfo_ValueOp.Merge(m, src) 124 } 125 func (m *ValueOp) XXX_Size() int { 126 return m.Size() 127 } 128 func (m *ValueOp) XXX_DiscardUnknown() { 129 xxx_messageInfo_ValueOp.DiscardUnknown(m) 130 } 131 132 var xxx_messageInfo_ValueOp proto.InternalMessageInfo 133 134 func (m *ValueOp) GetKey() []byte { 135 if m != nil { 136 return m.Key 137 } 138 return nil 139 } 140 141 func (m *ValueOp) GetProof() *Proof { 142 if m != nil { 143 return m.Proof 144 } 145 return nil 146 } 147 148 type DominoOp struct { 149 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` 150 Input string `protobuf:"bytes,2,opt,name=input,proto3" json:"input,omitempty"` 151 Output string `protobuf:"bytes,3,opt,name=output,proto3" json:"output,omitempty"` 152 } 153 154 func (m *DominoOp) Reset() { *m = DominoOp{} } 155 func (m *DominoOp) String() string { return proto.CompactTextString(m) } 156 func (*DominoOp) ProtoMessage() {} 157 func (*DominoOp) Descriptor() ([]byte, []int) { 158 return fileDescriptor_6b60b6ba2ab5b856, []int{2} 159 } 160 func (m *DominoOp) XXX_Unmarshal(b []byte) error { 161 return m.Unmarshal(b) 162 } 163 func (m *DominoOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 164 if deterministic { 165 return xxx_messageInfo_DominoOp.Marshal(b, m, deterministic) 166 } else { 167 b = b[:cap(b)] 168 n, err := m.MarshalToSizedBuffer(b) 169 if err != nil { 170 return nil, err 171 } 172 return b[:n], nil 173 } 174 } 175 func (m *DominoOp) XXX_Merge(src proto.Message) { 176 xxx_messageInfo_DominoOp.Merge(m, src) 177 } 178 func (m *DominoOp) XXX_Size() int { 179 return m.Size() 180 } 181 func (m *DominoOp) XXX_DiscardUnknown() { 182 xxx_messageInfo_DominoOp.DiscardUnknown(m) 183 } 184 185 var xxx_messageInfo_DominoOp proto.InternalMessageInfo 186 187 func (m *DominoOp) GetKey() string { 188 if m != nil { 189 return m.Key 190 } 191 return "" 192 } 193 194 func (m *DominoOp) GetInput() string { 195 if m != nil { 196 return m.Input 197 } 198 return "" 199 } 200 201 func (m *DominoOp) GetOutput() string { 202 if m != nil { 203 return m.Output 204 } 205 return "" 206 } 207 208 // ProofOp defines an operation used for calculating Merkle root 209 // The data could be arbitrary format, providing nessecary data 210 // for example neighbouring node hash 211 type ProofOp struct { 212 Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` 213 Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` 214 Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` 215 } 216 217 func (m *ProofOp) Reset() { *m = ProofOp{} } 218 func (m *ProofOp) String() string { return proto.CompactTextString(m) } 219 func (*ProofOp) ProtoMessage() {} 220 func (*ProofOp) Descriptor() ([]byte, []int) { 221 return fileDescriptor_6b60b6ba2ab5b856, []int{3} 222 } 223 func (m *ProofOp) XXX_Unmarshal(b []byte) error { 224 return m.Unmarshal(b) 225 } 226 func (m *ProofOp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 227 if deterministic { 228 return xxx_messageInfo_ProofOp.Marshal(b, m, deterministic) 229 } else { 230 b = b[:cap(b)] 231 n, err := m.MarshalToSizedBuffer(b) 232 if err != nil { 233 return nil, err 234 } 235 return b[:n], nil 236 } 237 } 238 func (m *ProofOp) XXX_Merge(src proto.Message) { 239 xxx_messageInfo_ProofOp.Merge(m, src) 240 } 241 func (m *ProofOp) XXX_Size() int { 242 return m.Size() 243 } 244 func (m *ProofOp) XXX_DiscardUnknown() { 245 xxx_messageInfo_ProofOp.DiscardUnknown(m) 246 } 247 248 var xxx_messageInfo_ProofOp proto.InternalMessageInfo 249 250 func (m *ProofOp) GetType() string { 251 if m != nil { 252 return m.Type 253 } 254 return "" 255 } 256 257 func (m *ProofOp) GetKey() []byte { 258 if m != nil { 259 return m.Key 260 } 261 return nil 262 } 263 264 func (m *ProofOp) GetData() []byte { 265 if m != nil { 266 return m.Data 267 } 268 return nil 269 } 270 271 // ProofOps is Merkle proof defined by the list of ProofOps 272 type ProofOps struct { 273 Ops []ProofOp `protobuf:"bytes,1,rep,name=ops,proto3" json:"ops"` 274 } 275 276 func (m *ProofOps) Reset() { *m = ProofOps{} } 277 func (m *ProofOps) String() string { return proto.CompactTextString(m) } 278 func (*ProofOps) ProtoMessage() {} 279 func (*ProofOps) Descriptor() ([]byte, []int) { 280 return fileDescriptor_6b60b6ba2ab5b856, []int{4} 281 } 282 func (m *ProofOps) XXX_Unmarshal(b []byte) error { 283 return m.Unmarshal(b) 284 } 285 func (m *ProofOps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 286 if deterministic { 287 return xxx_messageInfo_ProofOps.Marshal(b, m, deterministic) 288 } else { 289 b = b[:cap(b)] 290 n, err := m.MarshalToSizedBuffer(b) 291 if err != nil { 292 return nil, err 293 } 294 return b[:n], nil 295 } 296 } 297 func (m *ProofOps) XXX_Merge(src proto.Message) { 298 xxx_messageInfo_ProofOps.Merge(m, src) 299 } 300 func (m *ProofOps) XXX_Size() int { 301 return m.Size() 302 } 303 func (m *ProofOps) XXX_DiscardUnknown() { 304 xxx_messageInfo_ProofOps.DiscardUnknown(m) 305 } 306 307 var xxx_messageInfo_ProofOps proto.InternalMessageInfo 308 309 func (m *ProofOps) GetOps() []ProofOp { 310 if m != nil { 311 return m.Ops 312 } 313 return nil 314 } 315 316 func init() { 317 proto.RegisterType((*Proof)(nil), "tendermint.crypto.Proof") 318 proto.RegisterType((*ValueOp)(nil), "tendermint.crypto.ValueOp") 319 proto.RegisterType((*DominoOp)(nil), "tendermint.crypto.DominoOp") 320 proto.RegisterType((*ProofOp)(nil), "tendermint.crypto.ProofOp") 321 proto.RegisterType((*ProofOps)(nil), "tendermint.crypto.ProofOps") 322 } 323 324 func init() { proto.RegisterFile("tendermint/crypto/proof.proto", fileDescriptor_6b60b6ba2ab5b856) } 325 326 var fileDescriptor_6b60b6ba2ab5b856 = []byte{ 327 // 377 bytes of a gzipped FileDescriptorProto 328 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xbf, 0x6a, 0xeb, 0x30, 329 0x18, 0xc5, 0xed, 0xd8, 0xf9, 0xa7, 0x64, 0xb8, 0x57, 0x84, 0x8b, 0xc9, 0xe5, 0xfa, 0x1a, 0x4f, 330 0x9e, 0x2c, 0x48, 0x3a, 0x77, 0x48, 0x3a, 0x94, 0x66, 0x48, 0x31, 0xa5, 0x43, 0x97, 0xa2, 0x38, 331 0x8a, 0x6d, 0x1a, 0x4b, 0xc2, 0x96, 0xa1, 0x7e, 0x8b, 0x3e, 0x56, 0xc6, 0x8c, 0x9d, 0x4a, 0x49, 332 0x5e, 0xa4, 0x48, 0x72, 0x1b, 0x4a, 0xe8, 0xf6, 0x9d, 0x73, 0x3e, 0xfd, 0x74, 0x84, 0x0d, 0xfe, 333 0x09, 0x42, 0xd7, 0xa4, 0xc8, 0x33, 0x2a, 0x50, 0x5c, 0xd4, 0x5c, 0x30, 0xc4, 0x0b, 0xc6, 0x36, 334 0x21, 0x2f, 0x98, 0x60, 0xf0, 0xf7, 0x29, 0x0e, 0x75, 0x3c, 0x1e, 0x25, 0x2c, 0x61, 0x2a, 0x45, 335 0x72, 0xd2, 0x8b, 0xfe, 0x06, 0xb4, 0x6f, 0xe5, 0x39, 0x38, 0x02, 0x6d, 0xc1, 0x04, 0xde, 0x3a, 336 0xa6, 0x67, 0x06, 0x56, 0xa4, 0x85, 0x74, 0x33, 0xba, 0x26, 0xcf, 0x4e, 0x4b, 0xbb, 0x4a, 0xc0, 337 0xbf, 0xa0, 0xbf, 0x25, 0x78, 0xf3, 0x98, 0xe2, 0x32, 0x75, 0x2c, 0xcf, 0x0c, 0x86, 0x51, 0x4f, 338 0x1a, 0xd7, 0xb8, 0x4c, 0xe5, 0x11, 0x5c, 0x51, 0x51, 0x3a, 0xb6, 0x67, 0x05, 0xc3, 0x48, 0x0b, 339 0x7f, 0x01, 0xba, 0xf7, 0x78, 0x5b, 0x91, 0x25, 0x87, 0xbf, 0x80, 0xf5, 0x44, 0x6a, 0x75, 0xcf, 340 0x30, 0x92, 0x23, 0x0c, 0x41, 0x5b, 0x95, 0x57, 0xb7, 0x0c, 0x26, 0x4e, 0x78, 0xd6, 0x3e, 0x54, 341 0x25, 0x23, 0xbd, 0xe6, 0xdf, 0x80, 0xde, 0x15, 0xcb, 0x33, 0xca, 0xbe, 0xd3, 0xfa, 0x9a, 0xa6, 342 0x3a, 0xf3, 0x4a, 0x28, 0x5a, 0x3f, 0xd2, 0x02, 0xfe, 0x01, 0x1d, 0x56, 0x09, 0x69, 0x5b, 0xca, 343 0x6e, 0x94, 0x3f, 0x07, 0x5d, 0xc5, 0x5e, 0x72, 0x08, 0x81, 0x2d, 0x6a, 0x4e, 0x1a, 0x96, 0x9a, 344 0x3f, 0xf1, 0xad, 0x53, 0x59, 0x08, 0xec, 0x35, 0x16, 0xb8, 0x79, 0xb7, 0x9a, 0xfd, 0x4b, 0xd0, 345 0x6b, 0x20, 0x25, 0x9c, 0x00, 0x8b, 0xf1, 0xd2, 0x31, 0x3d, 0x2b, 0x18, 0x4c, 0xc6, 0x3f, 0x3d, 346 0x65, 0xc9, 0x67, 0xf6, 0xee, 0xed, 0xbf, 0x11, 0xc9, 0xe5, 0x19, 0xd9, 0x1d, 0x5c, 0x73, 0x7f, 347 0x70, 0xcd, 0xf7, 0x83, 0x6b, 0xbe, 0x1c, 0x5d, 0x63, 0x7f, 0x74, 0x8d, 0xd7, 0xa3, 0x6b, 0x3c, 348 0x2c, 0x92, 0x4c, 0xa4, 0xd5, 0x2a, 0x8c, 0x59, 0x8e, 0xca, 0x8a, 0x17, 0x38, 0xa9, 0x31, 0xba, 349 0xfb, 0x62, 0xce, 0x19, 0xa5, 0x24, 0x16, 0xac, 0x40, 0x71, 0x8a, 0x33, 0x5a, 0x22, 0x91, 0x4f, 350 0x2f, 0x90, 0xfe, 0xca, 0x67, 0x7f, 0xc8, 0xaa, 0xa3, 0x82, 0xe9, 0x47, 0x00, 0x00, 0x00, 0xff, 351 0xff, 0x9e, 0x26, 0x77, 0x80, 0x3d, 0x02, 0x00, 0x00, 352 } 353 354 func (m *Proof) Marshal() (dAtA []byte, err error) { 355 size := m.Size() 356 dAtA = make([]byte, size) 357 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 358 if err != nil { 359 return nil, err 360 } 361 return dAtA[:n], nil 362 } 363 364 func (m *Proof) MarshalTo(dAtA []byte) (int, error) { 365 size := m.Size() 366 return m.MarshalToSizedBuffer(dAtA[:size]) 367 } 368 369 func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error) { 370 i := len(dAtA) 371 _ = i 372 var l int 373 _ = l 374 if len(m.Aunts) > 0 { 375 for iNdEx := len(m.Aunts) - 1; iNdEx >= 0; iNdEx-- { 376 i -= len(m.Aunts[iNdEx]) 377 copy(dAtA[i:], m.Aunts[iNdEx]) 378 i = encodeVarintProof(dAtA, i, uint64(len(m.Aunts[iNdEx]))) 379 i-- 380 dAtA[i] = 0x22 381 } 382 } 383 if len(m.LeafHash) > 0 { 384 i -= len(m.LeafHash) 385 copy(dAtA[i:], m.LeafHash) 386 i = encodeVarintProof(dAtA, i, uint64(len(m.LeafHash))) 387 i-- 388 dAtA[i] = 0x1a 389 } 390 if m.Index != 0 { 391 i = encodeVarintProof(dAtA, i, uint64(m.Index)) 392 i-- 393 dAtA[i] = 0x10 394 } 395 if m.Total != 0 { 396 i = encodeVarintProof(dAtA, i, uint64(m.Total)) 397 i-- 398 dAtA[i] = 0x8 399 } 400 return len(dAtA) - i, nil 401 } 402 403 func (m *ValueOp) Marshal() (dAtA []byte, err error) { 404 size := m.Size() 405 dAtA = make([]byte, size) 406 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 407 if err != nil { 408 return nil, err 409 } 410 return dAtA[:n], nil 411 } 412 413 func (m *ValueOp) MarshalTo(dAtA []byte) (int, error) { 414 size := m.Size() 415 return m.MarshalToSizedBuffer(dAtA[:size]) 416 } 417 418 func (m *ValueOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 419 i := len(dAtA) 420 _ = i 421 var l int 422 _ = l 423 if m.Proof != nil { 424 { 425 size, err := m.Proof.MarshalToSizedBuffer(dAtA[:i]) 426 if err != nil { 427 return 0, err 428 } 429 i -= size 430 i = encodeVarintProof(dAtA, i, uint64(size)) 431 } 432 i-- 433 dAtA[i] = 0x12 434 } 435 if len(m.Key) > 0 { 436 i -= len(m.Key) 437 copy(dAtA[i:], m.Key) 438 i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) 439 i-- 440 dAtA[i] = 0xa 441 } 442 return len(dAtA) - i, nil 443 } 444 445 func (m *DominoOp) Marshal() (dAtA []byte, err error) { 446 size := m.Size() 447 dAtA = make([]byte, size) 448 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 449 if err != nil { 450 return nil, err 451 } 452 return dAtA[:n], nil 453 } 454 455 func (m *DominoOp) MarshalTo(dAtA []byte) (int, error) { 456 size := m.Size() 457 return m.MarshalToSizedBuffer(dAtA[:size]) 458 } 459 460 func (m *DominoOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 461 i := len(dAtA) 462 _ = i 463 var l int 464 _ = l 465 if len(m.Output) > 0 { 466 i -= len(m.Output) 467 copy(dAtA[i:], m.Output) 468 i = encodeVarintProof(dAtA, i, uint64(len(m.Output))) 469 i-- 470 dAtA[i] = 0x1a 471 } 472 if len(m.Input) > 0 { 473 i -= len(m.Input) 474 copy(dAtA[i:], m.Input) 475 i = encodeVarintProof(dAtA, i, uint64(len(m.Input))) 476 i-- 477 dAtA[i] = 0x12 478 } 479 if len(m.Key) > 0 { 480 i -= len(m.Key) 481 copy(dAtA[i:], m.Key) 482 i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) 483 i-- 484 dAtA[i] = 0xa 485 } 486 return len(dAtA) - i, nil 487 } 488 489 func (m *ProofOp) Marshal() (dAtA []byte, err error) { 490 size := m.Size() 491 dAtA = make([]byte, size) 492 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 493 if err != nil { 494 return nil, err 495 } 496 return dAtA[:n], nil 497 } 498 499 func (m *ProofOp) MarshalTo(dAtA []byte) (int, error) { 500 size := m.Size() 501 return m.MarshalToSizedBuffer(dAtA[:size]) 502 } 503 504 func (m *ProofOp) MarshalToSizedBuffer(dAtA []byte) (int, error) { 505 i := len(dAtA) 506 _ = i 507 var l int 508 _ = l 509 if len(m.Data) > 0 { 510 i -= len(m.Data) 511 copy(dAtA[i:], m.Data) 512 i = encodeVarintProof(dAtA, i, uint64(len(m.Data))) 513 i-- 514 dAtA[i] = 0x1a 515 } 516 if len(m.Key) > 0 { 517 i -= len(m.Key) 518 copy(dAtA[i:], m.Key) 519 i = encodeVarintProof(dAtA, i, uint64(len(m.Key))) 520 i-- 521 dAtA[i] = 0x12 522 } 523 if len(m.Type) > 0 { 524 i -= len(m.Type) 525 copy(dAtA[i:], m.Type) 526 i = encodeVarintProof(dAtA, i, uint64(len(m.Type))) 527 i-- 528 dAtA[i] = 0xa 529 } 530 return len(dAtA) - i, nil 531 } 532 533 func (m *ProofOps) Marshal() (dAtA []byte, err error) { 534 size := m.Size() 535 dAtA = make([]byte, size) 536 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 537 if err != nil { 538 return nil, err 539 } 540 return dAtA[:n], nil 541 } 542 543 func (m *ProofOps) MarshalTo(dAtA []byte) (int, error) { 544 size := m.Size() 545 return m.MarshalToSizedBuffer(dAtA[:size]) 546 } 547 548 func (m *ProofOps) MarshalToSizedBuffer(dAtA []byte) (int, error) { 549 i := len(dAtA) 550 _ = i 551 var l int 552 _ = l 553 if len(m.Ops) > 0 { 554 for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- { 555 { 556 size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 557 if err != nil { 558 return 0, err 559 } 560 i -= size 561 i = encodeVarintProof(dAtA, i, uint64(size)) 562 } 563 i-- 564 dAtA[i] = 0xa 565 } 566 } 567 return len(dAtA) - i, nil 568 } 569 570 func encodeVarintProof(dAtA []byte, offset int, v uint64) int { 571 offset -= sovProof(v) 572 base := offset 573 for v >= 1<<7 { 574 dAtA[offset] = uint8(v&0x7f | 0x80) 575 v >>= 7 576 offset++ 577 } 578 dAtA[offset] = uint8(v) 579 return base 580 } 581 func (m *Proof) Size() (n int) { 582 if m == nil { 583 return 0 584 } 585 var l int 586 _ = l 587 if m.Total != 0 { 588 n += 1 + sovProof(uint64(m.Total)) 589 } 590 if m.Index != 0 { 591 n += 1 + sovProof(uint64(m.Index)) 592 } 593 l = len(m.LeafHash) 594 if l > 0 { 595 n += 1 + l + sovProof(uint64(l)) 596 } 597 if len(m.Aunts) > 0 { 598 for _, b := range m.Aunts { 599 l = len(b) 600 n += 1 + l + sovProof(uint64(l)) 601 } 602 } 603 return n 604 } 605 606 func (m *ValueOp) Size() (n int) { 607 if m == nil { 608 return 0 609 } 610 var l int 611 _ = l 612 l = len(m.Key) 613 if l > 0 { 614 n += 1 + l + sovProof(uint64(l)) 615 } 616 if m.Proof != nil { 617 l = m.Proof.Size() 618 n += 1 + l + sovProof(uint64(l)) 619 } 620 return n 621 } 622 623 func (m *DominoOp) Size() (n int) { 624 if m == nil { 625 return 0 626 } 627 var l int 628 _ = l 629 l = len(m.Key) 630 if l > 0 { 631 n += 1 + l + sovProof(uint64(l)) 632 } 633 l = len(m.Input) 634 if l > 0 { 635 n += 1 + l + sovProof(uint64(l)) 636 } 637 l = len(m.Output) 638 if l > 0 { 639 n += 1 + l + sovProof(uint64(l)) 640 } 641 return n 642 } 643 644 func (m *ProofOp) Size() (n int) { 645 if m == nil { 646 return 0 647 } 648 var l int 649 _ = l 650 l = len(m.Type) 651 if l > 0 { 652 n += 1 + l + sovProof(uint64(l)) 653 } 654 l = len(m.Key) 655 if l > 0 { 656 n += 1 + l + sovProof(uint64(l)) 657 } 658 l = len(m.Data) 659 if l > 0 { 660 n += 1 + l + sovProof(uint64(l)) 661 } 662 return n 663 } 664 665 func (m *ProofOps) Size() (n int) { 666 if m == nil { 667 return 0 668 } 669 var l int 670 _ = l 671 if len(m.Ops) > 0 { 672 for _, e := range m.Ops { 673 l = e.Size() 674 n += 1 + l + sovProof(uint64(l)) 675 } 676 } 677 return n 678 } 679 680 func sovProof(x uint64) (n int) { 681 return (math_bits.Len64(x|1) + 6) / 7 682 } 683 func sozProof(x uint64) (n int) { 684 return sovProof(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 685 } 686 func (m *Proof) Unmarshal(dAtA []byte) error { 687 l := len(dAtA) 688 iNdEx := 0 689 for iNdEx < l { 690 preIndex := iNdEx 691 var wire uint64 692 for shift := uint(0); ; shift += 7 { 693 if shift >= 64 { 694 return ErrIntOverflowProof 695 } 696 if iNdEx >= l { 697 return io.ErrUnexpectedEOF 698 } 699 b := dAtA[iNdEx] 700 iNdEx++ 701 wire |= uint64(b&0x7F) << shift 702 if b < 0x80 { 703 break 704 } 705 } 706 fieldNum := int32(wire >> 3) 707 wireType := int(wire & 0x7) 708 if wireType == 4 { 709 return fmt.Errorf("proto: Proof: wiretype end group for non-group") 710 } 711 if fieldNum <= 0 { 712 return fmt.Errorf("proto: Proof: illegal tag %d (wire type %d)", fieldNum, wire) 713 } 714 switch fieldNum { 715 case 1: 716 if wireType != 0 { 717 return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) 718 } 719 m.Total = 0 720 for shift := uint(0); ; shift += 7 { 721 if shift >= 64 { 722 return ErrIntOverflowProof 723 } 724 if iNdEx >= l { 725 return io.ErrUnexpectedEOF 726 } 727 b := dAtA[iNdEx] 728 iNdEx++ 729 m.Total |= int64(b&0x7F) << shift 730 if b < 0x80 { 731 break 732 } 733 } 734 case 2: 735 if wireType != 0 { 736 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 737 } 738 m.Index = 0 739 for shift := uint(0); ; shift += 7 { 740 if shift >= 64 { 741 return ErrIntOverflowProof 742 } 743 if iNdEx >= l { 744 return io.ErrUnexpectedEOF 745 } 746 b := dAtA[iNdEx] 747 iNdEx++ 748 m.Index |= int64(b&0x7F) << shift 749 if b < 0x80 { 750 break 751 } 752 } 753 case 3: 754 if wireType != 2 { 755 return fmt.Errorf("proto: wrong wireType = %d for field LeafHash", wireType) 756 } 757 var byteLen int 758 for shift := uint(0); ; shift += 7 { 759 if shift >= 64 { 760 return ErrIntOverflowProof 761 } 762 if iNdEx >= l { 763 return io.ErrUnexpectedEOF 764 } 765 b := dAtA[iNdEx] 766 iNdEx++ 767 byteLen |= int(b&0x7F) << shift 768 if b < 0x80 { 769 break 770 } 771 } 772 if byteLen < 0 { 773 return ErrInvalidLengthProof 774 } 775 postIndex := iNdEx + byteLen 776 if postIndex < 0 { 777 return ErrInvalidLengthProof 778 } 779 if postIndex > l { 780 return io.ErrUnexpectedEOF 781 } 782 m.LeafHash = append(m.LeafHash[:0], dAtA[iNdEx:postIndex]...) 783 if m.LeafHash == nil { 784 m.LeafHash = []byte{} 785 } 786 iNdEx = postIndex 787 case 4: 788 if wireType != 2 { 789 return fmt.Errorf("proto: wrong wireType = %d for field Aunts", wireType) 790 } 791 var byteLen int 792 for shift := uint(0); ; shift += 7 { 793 if shift >= 64 { 794 return ErrIntOverflowProof 795 } 796 if iNdEx >= l { 797 return io.ErrUnexpectedEOF 798 } 799 b := dAtA[iNdEx] 800 iNdEx++ 801 byteLen |= int(b&0x7F) << shift 802 if b < 0x80 { 803 break 804 } 805 } 806 if byteLen < 0 { 807 return ErrInvalidLengthProof 808 } 809 postIndex := iNdEx + byteLen 810 if postIndex < 0 { 811 return ErrInvalidLengthProof 812 } 813 if postIndex > l { 814 return io.ErrUnexpectedEOF 815 } 816 m.Aunts = append(m.Aunts, make([]byte, postIndex-iNdEx)) 817 copy(m.Aunts[len(m.Aunts)-1], dAtA[iNdEx:postIndex]) 818 iNdEx = postIndex 819 default: 820 iNdEx = preIndex 821 skippy, err := skipProof(dAtA[iNdEx:]) 822 if err != nil { 823 return err 824 } 825 if (skippy < 0) || (iNdEx+skippy) < 0 { 826 return ErrInvalidLengthProof 827 } 828 if (iNdEx + skippy) > l { 829 return io.ErrUnexpectedEOF 830 } 831 iNdEx += skippy 832 } 833 } 834 835 if iNdEx > l { 836 return io.ErrUnexpectedEOF 837 } 838 return nil 839 } 840 func (m *ValueOp) Unmarshal(dAtA []byte) error { 841 l := len(dAtA) 842 iNdEx := 0 843 for iNdEx < l { 844 preIndex := iNdEx 845 var wire uint64 846 for shift := uint(0); ; shift += 7 { 847 if shift >= 64 { 848 return ErrIntOverflowProof 849 } 850 if iNdEx >= l { 851 return io.ErrUnexpectedEOF 852 } 853 b := dAtA[iNdEx] 854 iNdEx++ 855 wire |= uint64(b&0x7F) << shift 856 if b < 0x80 { 857 break 858 } 859 } 860 fieldNum := int32(wire >> 3) 861 wireType := int(wire & 0x7) 862 if wireType == 4 { 863 return fmt.Errorf("proto: ValueOp: wiretype end group for non-group") 864 } 865 if fieldNum <= 0 { 866 return fmt.Errorf("proto: ValueOp: illegal tag %d (wire type %d)", fieldNum, wire) 867 } 868 switch fieldNum { 869 case 1: 870 if wireType != 2 { 871 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 872 } 873 var byteLen int 874 for shift := uint(0); ; shift += 7 { 875 if shift >= 64 { 876 return ErrIntOverflowProof 877 } 878 if iNdEx >= l { 879 return io.ErrUnexpectedEOF 880 } 881 b := dAtA[iNdEx] 882 iNdEx++ 883 byteLen |= int(b&0x7F) << shift 884 if b < 0x80 { 885 break 886 } 887 } 888 if byteLen < 0 { 889 return ErrInvalidLengthProof 890 } 891 postIndex := iNdEx + byteLen 892 if postIndex < 0 { 893 return ErrInvalidLengthProof 894 } 895 if postIndex > l { 896 return io.ErrUnexpectedEOF 897 } 898 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 899 if m.Key == nil { 900 m.Key = []byte{} 901 } 902 iNdEx = postIndex 903 case 2: 904 if wireType != 2 { 905 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 906 } 907 var msglen int 908 for shift := uint(0); ; shift += 7 { 909 if shift >= 64 { 910 return ErrIntOverflowProof 911 } 912 if iNdEx >= l { 913 return io.ErrUnexpectedEOF 914 } 915 b := dAtA[iNdEx] 916 iNdEx++ 917 msglen |= int(b&0x7F) << shift 918 if b < 0x80 { 919 break 920 } 921 } 922 if msglen < 0 { 923 return ErrInvalidLengthProof 924 } 925 postIndex := iNdEx + msglen 926 if postIndex < 0 { 927 return ErrInvalidLengthProof 928 } 929 if postIndex > l { 930 return io.ErrUnexpectedEOF 931 } 932 if m.Proof == nil { 933 m.Proof = &Proof{} 934 } 935 if err := m.Proof.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 936 return err 937 } 938 iNdEx = postIndex 939 default: 940 iNdEx = preIndex 941 skippy, err := skipProof(dAtA[iNdEx:]) 942 if err != nil { 943 return err 944 } 945 if (skippy < 0) || (iNdEx+skippy) < 0 { 946 return ErrInvalidLengthProof 947 } 948 if (iNdEx + skippy) > l { 949 return io.ErrUnexpectedEOF 950 } 951 iNdEx += skippy 952 } 953 } 954 955 if iNdEx > l { 956 return io.ErrUnexpectedEOF 957 } 958 return nil 959 } 960 func (m *DominoOp) Unmarshal(dAtA []byte) error { 961 l := len(dAtA) 962 iNdEx := 0 963 for iNdEx < l { 964 preIndex := iNdEx 965 var wire uint64 966 for shift := uint(0); ; shift += 7 { 967 if shift >= 64 { 968 return ErrIntOverflowProof 969 } 970 if iNdEx >= l { 971 return io.ErrUnexpectedEOF 972 } 973 b := dAtA[iNdEx] 974 iNdEx++ 975 wire |= uint64(b&0x7F) << shift 976 if b < 0x80 { 977 break 978 } 979 } 980 fieldNum := int32(wire >> 3) 981 wireType := int(wire & 0x7) 982 if wireType == 4 { 983 return fmt.Errorf("proto: DominoOp: wiretype end group for non-group") 984 } 985 if fieldNum <= 0 { 986 return fmt.Errorf("proto: DominoOp: illegal tag %d (wire type %d)", fieldNum, wire) 987 } 988 switch fieldNum { 989 case 1: 990 if wireType != 2 { 991 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 992 } 993 var stringLen uint64 994 for shift := uint(0); ; shift += 7 { 995 if shift >= 64 { 996 return ErrIntOverflowProof 997 } 998 if iNdEx >= l { 999 return io.ErrUnexpectedEOF 1000 } 1001 b := dAtA[iNdEx] 1002 iNdEx++ 1003 stringLen |= uint64(b&0x7F) << shift 1004 if b < 0x80 { 1005 break 1006 } 1007 } 1008 intStringLen := int(stringLen) 1009 if intStringLen < 0 { 1010 return ErrInvalidLengthProof 1011 } 1012 postIndex := iNdEx + intStringLen 1013 if postIndex < 0 { 1014 return ErrInvalidLengthProof 1015 } 1016 if postIndex > l { 1017 return io.ErrUnexpectedEOF 1018 } 1019 m.Key = string(dAtA[iNdEx:postIndex]) 1020 iNdEx = postIndex 1021 case 2: 1022 if wireType != 2 { 1023 return fmt.Errorf("proto: wrong wireType = %d for field Input", wireType) 1024 } 1025 var stringLen uint64 1026 for shift := uint(0); ; shift += 7 { 1027 if shift >= 64 { 1028 return ErrIntOverflowProof 1029 } 1030 if iNdEx >= l { 1031 return io.ErrUnexpectedEOF 1032 } 1033 b := dAtA[iNdEx] 1034 iNdEx++ 1035 stringLen |= uint64(b&0x7F) << shift 1036 if b < 0x80 { 1037 break 1038 } 1039 } 1040 intStringLen := int(stringLen) 1041 if intStringLen < 0 { 1042 return ErrInvalidLengthProof 1043 } 1044 postIndex := iNdEx + intStringLen 1045 if postIndex < 0 { 1046 return ErrInvalidLengthProof 1047 } 1048 if postIndex > l { 1049 return io.ErrUnexpectedEOF 1050 } 1051 m.Input = string(dAtA[iNdEx:postIndex]) 1052 iNdEx = postIndex 1053 case 3: 1054 if wireType != 2 { 1055 return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) 1056 } 1057 var stringLen uint64 1058 for shift := uint(0); ; shift += 7 { 1059 if shift >= 64 { 1060 return ErrIntOverflowProof 1061 } 1062 if iNdEx >= l { 1063 return io.ErrUnexpectedEOF 1064 } 1065 b := dAtA[iNdEx] 1066 iNdEx++ 1067 stringLen |= uint64(b&0x7F) << shift 1068 if b < 0x80 { 1069 break 1070 } 1071 } 1072 intStringLen := int(stringLen) 1073 if intStringLen < 0 { 1074 return ErrInvalidLengthProof 1075 } 1076 postIndex := iNdEx + intStringLen 1077 if postIndex < 0 { 1078 return ErrInvalidLengthProof 1079 } 1080 if postIndex > l { 1081 return io.ErrUnexpectedEOF 1082 } 1083 m.Output = string(dAtA[iNdEx:postIndex]) 1084 iNdEx = postIndex 1085 default: 1086 iNdEx = preIndex 1087 skippy, err := skipProof(dAtA[iNdEx:]) 1088 if err != nil { 1089 return err 1090 } 1091 if (skippy < 0) || (iNdEx+skippy) < 0 { 1092 return ErrInvalidLengthProof 1093 } 1094 if (iNdEx + skippy) > l { 1095 return io.ErrUnexpectedEOF 1096 } 1097 iNdEx += skippy 1098 } 1099 } 1100 1101 if iNdEx > l { 1102 return io.ErrUnexpectedEOF 1103 } 1104 return nil 1105 } 1106 func (m *ProofOp) Unmarshal(dAtA []byte) error { 1107 l := len(dAtA) 1108 iNdEx := 0 1109 for iNdEx < l { 1110 preIndex := iNdEx 1111 var wire uint64 1112 for shift := uint(0); ; shift += 7 { 1113 if shift >= 64 { 1114 return ErrIntOverflowProof 1115 } 1116 if iNdEx >= l { 1117 return io.ErrUnexpectedEOF 1118 } 1119 b := dAtA[iNdEx] 1120 iNdEx++ 1121 wire |= uint64(b&0x7F) << shift 1122 if b < 0x80 { 1123 break 1124 } 1125 } 1126 fieldNum := int32(wire >> 3) 1127 wireType := int(wire & 0x7) 1128 if wireType == 4 { 1129 return fmt.Errorf("proto: ProofOp: wiretype end group for non-group") 1130 } 1131 if fieldNum <= 0 { 1132 return fmt.Errorf("proto: ProofOp: illegal tag %d (wire type %d)", fieldNum, wire) 1133 } 1134 switch fieldNum { 1135 case 1: 1136 if wireType != 2 { 1137 return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) 1138 } 1139 var stringLen uint64 1140 for shift := uint(0); ; shift += 7 { 1141 if shift >= 64 { 1142 return ErrIntOverflowProof 1143 } 1144 if iNdEx >= l { 1145 return io.ErrUnexpectedEOF 1146 } 1147 b := dAtA[iNdEx] 1148 iNdEx++ 1149 stringLen |= uint64(b&0x7F) << shift 1150 if b < 0x80 { 1151 break 1152 } 1153 } 1154 intStringLen := int(stringLen) 1155 if intStringLen < 0 { 1156 return ErrInvalidLengthProof 1157 } 1158 postIndex := iNdEx + intStringLen 1159 if postIndex < 0 { 1160 return ErrInvalidLengthProof 1161 } 1162 if postIndex > l { 1163 return io.ErrUnexpectedEOF 1164 } 1165 m.Type = string(dAtA[iNdEx:postIndex]) 1166 iNdEx = postIndex 1167 case 2: 1168 if wireType != 2 { 1169 return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) 1170 } 1171 var byteLen int 1172 for shift := uint(0); ; shift += 7 { 1173 if shift >= 64 { 1174 return ErrIntOverflowProof 1175 } 1176 if iNdEx >= l { 1177 return io.ErrUnexpectedEOF 1178 } 1179 b := dAtA[iNdEx] 1180 iNdEx++ 1181 byteLen |= int(b&0x7F) << shift 1182 if b < 0x80 { 1183 break 1184 } 1185 } 1186 if byteLen < 0 { 1187 return ErrInvalidLengthProof 1188 } 1189 postIndex := iNdEx + byteLen 1190 if postIndex < 0 { 1191 return ErrInvalidLengthProof 1192 } 1193 if postIndex > l { 1194 return io.ErrUnexpectedEOF 1195 } 1196 m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) 1197 if m.Key == nil { 1198 m.Key = []byte{} 1199 } 1200 iNdEx = postIndex 1201 case 3: 1202 if wireType != 2 { 1203 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 1204 } 1205 var byteLen int 1206 for shift := uint(0); ; shift += 7 { 1207 if shift >= 64 { 1208 return ErrIntOverflowProof 1209 } 1210 if iNdEx >= l { 1211 return io.ErrUnexpectedEOF 1212 } 1213 b := dAtA[iNdEx] 1214 iNdEx++ 1215 byteLen |= int(b&0x7F) << shift 1216 if b < 0x80 { 1217 break 1218 } 1219 } 1220 if byteLen < 0 { 1221 return ErrInvalidLengthProof 1222 } 1223 postIndex := iNdEx + byteLen 1224 if postIndex < 0 { 1225 return ErrInvalidLengthProof 1226 } 1227 if postIndex > l { 1228 return io.ErrUnexpectedEOF 1229 } 1230 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 1231 if m.Data == nil { 1232 m.Data = []byte{} 1233 } 1234 iNdEx = postIndex 1235 default: 1236 iNdEx = preIndex 1237 skippy, err := skipProof(dAtA[iNdEx:]) 1238 if err != nil { 1239 return err 1240 } 1241 if (skippy < 0) || (iNdEx+skippy) < 0 { 1242 return ErrInvalidLengthProof 1243 } 1244 if (iNdEx + skippy) > l { 1245 return io.ErrUnexpectedEOF 1246 } 1247 iNdEx += skippy 1248 } 1249 } 1250 1251 if iNdEx > l { 1252 return io.ErrUnexpectedEOF 1253 } 1254 return nil 1255 } 1256 func (m *ProofOps) Unmarshal(dAtA []byte) error { 1257 l := len(dAtA) 1258 iNdEx := 0 1259 for iNdEx < l { 1260 preIndex := iNdEx 1261 var wire uint64 1262 for shift := uint(0); ; shift += 7 { 1263 if shift >= 64 { 1264 return ErrIntOverflowProof 1265 } 1266 if iNdEx >= l { 1267 return io.ErrUnexpectedEOF 1268 } 1269 b := dAtA[iNdEx] 1270 iNdEx++ 1271 wire |= uint64(b&0x7F) << shift 1272 if b < 0x80 { 1273 break 1274 } 1275 } 1276 fieldNum := int32(wire >> 3) 1277 wireType := int(wire & 0x7) 1278 if wireType == 4 { 1279 return fmt.Errorf("proto: ProofOps: wiretype end group for non-group") 1280 } 1281 if fieldNum <= 0 { 1282 return fmt.Errorf("proto: ProofOps: illegal tag %d (wire type %d)", fieldNum, wire) 1283 } 1284 switch fieldNum { 1285 case 1: 1286 if wireType != 2 { 1287 return fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType) 1288 } 1289 var msglen int 1290 for shift := uint(0); ; shift += 7 { 1291 if shift >= 64 { 1292 return ErrIntOverflowProof 1293 } 1294 if iNdEx >= l { 1295 return io.ErrUnexpectedEOF 1296 } 1297 b := dAtA[iNdEx] 1298 iNdEx++ 1299 msglen |= int(b&0x7F) << shift 1300 if b < 0x80 { 1301 break 1302 } 1303 } 1304 if msglen < 0 { 1305 return ErrInvalidLengthProof 1306 } 1307 postIndex := iNdEx + msglen 1308 if postIndex < 0 { 1309 return ErrInvalidLengthProof 1310 } 1311 if postIndex > l { 1312 return io.ErrUnexpectedEOF 1313 } 1314 m.Ops = append(m.Ops, ProofOp{}) 1315 if err := m.Ops[len(m.Ops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1316 return err 1317 } 1318 iNdEx = postIndex 1319 default: 1320 iNdEx = preIndex 1321 skippy, err := skipProof(dAtA[iNdEx:]) 1322 if err != nil { 1323 return err 1324 } 1325 if (skippy < 0) || (iNdEx+skippy) < 0 { 1326 return ErrInvalidLengthProof 1327 } 1328 if (iNdEx + skippy) > l { 1329 return io.ErrUnexpectedEOF 1330 } 1331 iNdEx += skippy 1332 } 1333 } 1334 1335 if iNdEx > l { 1336 return io.ErrUnexpectedEOF 1337 } 1338 return nil 1339 } 1340 func skipProof(dAtA []byte) (n int, err error) { 1341 l := len(dAtA) 1342 iNdEx := 0 1343 depth := 0 1344 for iNdEx < l { 1345 var wire uint64 1346 for shift := uint(0); ; shift += 7 { 1347 if shift >= 64 { 1348 return 0, ErrIntOverflowProof 1349 } 1350 if iNdEx >= l { 1351 return 0, io.ErrUnexpectedEOF 1352 } 1353 b := dAtA[iNdEx] 1354 iNdEx++ 1355 wire |= (uint64(b) & 0x7F) << shift 1356 if b < 0x80 { 1357 break 1358 } 1359 } 1360 wireType := int(wire & 0x7) 1361 switch wireType { 1362 case 0: 1363 for shift := uint(0); ; shift += 7 { 1364 if shift >= 64 { 1365 return 0, ErrIntOverflowProof 1366 } 1367 if iNdEx >= l { 1368 return 0, io.ErrUnexpectedEOF 1369 } 1370 iNdEx++ 1371 if dAtA[iNdEx-1] < 0x80 { 1372 break 1373 } 1374 } 1375 case 1: 1376 iNdEx += 8 1377 case 2: 1378 var length int 1379 for shift := uint(0); ; shift += 7 { 1380 if shift >= 64 { 1381 return 0, ErrIntOverflowProof 1382 } 1383 if iNdEx >= l { 1384 return 0, io.ErrUnexpectedEOF 1385 } 1386 b := dAtA[iNdEx] 1387 iNdEx++ 1388 length |= (int(b) & 0x7F) << shift 1389 if b < 0x80 { 1390 break 1391 } 1392 } 1393 if length < 0 { 1394 return 0, ErrInvalidLengthProof 1395 } 1396 iNdEx += length 1397 case 3: 1398 depth++ 1399 case 4: 1400 if depth == 0 { 1401 return 0, ErrUnexpectedEndOfGroupProof 1402 } 1403 depth-- 1404 case 5: 1405 iNdEx += 4 1406 default: 1407 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1408 } 1409 if iNdEx < 0 { 1410 return 0, ErrInvalidLengthProof 1411 } 1412 if depth == 0 { 1413 return iNdEx, nil 1414 } 1415 } 1416 return 0, io.ErrUnexpectedEOF 1417 } 1418 1419 var ( 1420 ErrInvalidLengthProof = fmt.Errorf("proto: negative length found during unmarshaling") 1421 ErrIntOverflowProof = fmt.Errorf("proto: integer overflow") 1422 ErrUnexpectedEndOfGroupProof = fmt.Errorf("proto: unexpected end of group") 1423 )