github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/bcm/bcm.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: bcm.proto 3 4 package bcm 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 time "time" 12 13 _ "github.com/gogo/protobuf/gogoproto" 14 proto "github.com/gogo/protobuf/proto" 15 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 16 golang_proto "github.com/golang/protobuf/proto" 17 _ "github.com/golang/protobuf/ptypes/timestamp" 18 github_com_hyperledger_burrow_binary "github.com/hyperledger/burrow/binary" 19 _ "google.golang.org/protobuf/types/known/durationpb" 20 ) 21 22 // Reference imports to suppress errors if they are not otherwise used. 23 var _ = proto.Marshal 24 var _ = golang_proto.Marshal 25 var _ = fmt.Errorf 26 var _ = math.Inf 27 var _ = time.Kitchen 28 29 // This is a compile-time assertion to ensure that this generated file 30 // is compatible with the proto package it is being compiled against. 31 // A compilation error at this line likely means your copy of the 32 // proto package needs to be updated. 33 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 34 35 type SyncInfo struct { 36 LatestBlockHeight uint64 `protobuf:"varint,1,opt,name=LatestBlockHeight,proto3" json:"LatestBlockHeight,omitempty"` 37 LatestBlockHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,2,opt,name=LatestBlockHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"LatestBlockHash"` 38 LatestAppHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,3,opt,name=LatestAppHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"LatestAppHash"` 39 // Timestamp of block as set by the block proposer 40 LatestBlockTime time.Time `protobuf:"bytes,4,opt,name=LatestBlockTime,proto3,stdtime" json:"LatestBlockTime"` 41 // Time at which we committed the last block 42 LatestBlockSeenTime time.Time `protobuf:"bytes,5,opt,name=LatestBlockSeenTime,proto3,stdtime" json:"LatestBlockSeenTime"` 43 // Time elapsed since last commit 44 LatestBlockDuration time.Duration `protobuf:"bytes,6,opt,name=LatestBlockDuration,proto3,stdduration" json:"LatestBlockDuration"` 45 XXX_NoUnkeyedLiteral struct{} `json:"-"` 46 XXX_unrecognized []byte `json:"-"` 47 XXX_sizecache int32 `json:"-"` 48 } 49 50 func (m *SyncInfo) Reset() { *m = SyncInfo{} } 51 func (m *SyncInfo) String() string { return proto.CompactTextString(m) } 52 func (*SyncInfo) ProtoMessage() {} 53 func (*SyncInfo) Descriptor() ([]byte, []int) { 54 return fileDescriptor_0c9ff3e1ca1cc0f1, []int{0} 55 } 56 func (m *SyncInfo) XXX_Unmarshal(b []byte) error { 57 return m.Unmarshal(b) 58 } 59 func (m *SyncInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 60 b = b[:cap(b)] 61 n, err := m.MarshalToSizedBuffer(b) 62 if err != nil { 63 return nil, err 64 } 65 return b[:n], nil 66 } 67 func (m *SyncInfo) XXX_Merge(src proto.Message) { 68 xxx_messageInfo_SyncInfo.Merge(m, src) 69 } 70 func (m *SyncInfo) XXX_Size() int { 71 return m.Size() 72 } 73 func (m *SyncInfo) XXX_DiscardUnknown() { 74 xxx_messageInfo_SyncInfo.DiscardUnknown(m) 75 } 76 77 var xxx_messageInfo_SyncInfo proto.InternalMessageInfo 78 79 func (m *SyncInfo) GetLatestBlockHeight() uint64 { 80 if m != nil { 81 return m.LatestBlockHeight 82 } 83 return 0 84 } 85 86 func (m *SyncInfo) GetLatestBlockTime() time.Time { 87 if m != nil { 88 return m.LatestBlockTime 89 } 90 return time.Time{} 91 } 92 93 func (m *SyncInfo) GetLatestBlockSeenTime() time.Time { 94 if m != nil { 95 return m.LatestBlockSeenTime 96 } 97 return time.Time{} 98 } 99 100 func (m *SyncInfo) GetLatestBlockDuration() time.Duration { 101 if m != nil { 102 return m.LatestBlockDuration 103 } 104 return 0 105 } 106 107 func (*SyncInfo) XXX_MessageName() string { 108 return "bcm.SyncInfo" 109 } 110 111 type PersistedState struct { 112 AppHashAfterLastBlock github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,1,opt,name=AppHashAfterLastBlock,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"AppHashAfterLastBlock"` 113 LastBlockTime time.Time `protobuf:"bytes,2,opt,name=LastBlockTime,proto3,stdtime" json:"LastBlockTime"` 114 LastBlockHeight uint64 `protobuf:"varint,3,opt,name=LastBlockHeight,proto3" json:"LastBlockHeight,omitempty"` 115 GenesisHash github_com_hyperledger_burrow_binary.HexBytes `protobuf:"bytes,4,opt,name=GenesisHash,proto3,customtype=github.com/hyperledger/burrow/binary.HexBytes" json:"GenesisHash"` 116 XXX_NoUnkeyedLiteral struct{} `json:"-"` 117 XXX_unrecognized []byte `json:"-"` 118 XXX_sizecache int32 `json:"-"` 119 } 120 121 func (m *PersistedState) Reset() { *m = PersistedState{} } 122 func (m *PersistedState) String() string { return proto.CompactTextString(m) } 123 func (*PersistedState) ProtoMessage() {} 124 func (*PersistedState) Descriptor() ([]byte, []int) { 125 return fileDescriptor_0c9ff3e1ca1cc0f1, []int{1} 126 } 127 func (m *PersistedState) XXX_Unmarshal(b []byte) error { 128 return m.Unmarshal(b) 129 } 130 func (m *PersistedState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 131 b = b[:cap(b)] 132 n, err := m.MarshalToSizedBuffer(b) 133 if err != nil { 134 return nil, err 135 } 136 return b[:n], nil 137 } 138 func (m *PersistedState) XXX_Merge(src proto.Message) { 139 xxx_messageInfo_PersistedState.Merge(m, src) 140 } 141 func (m *PersistedState) XXX_Size() int { 142 return m.Size() 143 } 144 func (m *PersistedState) XXX_DiscardUnknown() { 145 xxx_messageInfo_PersistedState.DiscardUnknown(m) 146 } 147 148 var xxx_messageInfo_PersistedState proto.InternalMessageInfo 149 150 func (m *PersistedState) GetLastBlockTime() time.Time { 151 if m != nil { 152 return m.LastBlockTime 153 } 154 return time.Time{} 155 } 156 157 func (m *PersistedState) GetLastBlockHeight() uint64 { 158 if m != nil { 159 return m.LastBlockHeight 160 } 161 return 0 162 } 163 164 func (*PersistedState) XXX_MessageName() string { 165 return "bcm.PersistedState" 166 } 167 func init() { 168 proto.RegisterType((*SyncInfo)(nil), "bcm.SyncInfo") 169 golang_proto.RegisterType((*SyncInfo)(nil), "bcm.SyncInfo") 170 proto.RegisterType((*PersistedState)(nil), "bcm.PersistedState") 171 golang_proto.RegisterType((*PersistedState)(nil), "bcm.PersistedState") 172 } 173 174 func init() { proto.RegisterFile("bcm.proto", fileDescriptor_0c9ff3e1ca1cc0f1) } 175 func init() { golang_proto.RegisterFile("bcm.proto", fileDescriptor_0c9ff3e1ca1cc0f1) } 176 177 var fileDescriptor_0c9ff3e1ca1cc0f1 = []byte{ 178 // 428 bytes of a gzipped FileDescriptorProto 179 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x92, 0x4f, 0x8f, 0x93, 0x40, 180 0x18, 0xc6, 0x9d, 0x52, 0x37, 0xeb, 0xac, 0x7f, 0xe2, 0xa8, 0x09, 0xf6, 0x00, 0x75, 0x4f, 0x1c, 181 0x14, 0x12, 0x8d, 0x27, 0x4f, 0x4b, 0x4c, 0x5c, 0xcd, 0xc6, 0x98, 0x76, 0xd5, 0x44, 0x0f, 0x06, 182 0xe8, 0x5b, 0x98, 0x6c, 0x61, 0xc8, 0xcc, 0x10, 0xe5, 0x5b, 0x78, 0xf4, 0xe3, 0x78, 0xec, 0xc1, 183 0x83, 0x47, 0xe3, 0xa1, 0x1a, 0xfa, 0x19, 0xbc, 0x1b, 0x06, 0x48, 0x80, 0x36, 0x31, 0xb5, 0x37, 184 0xe6, 0x7d, 0xde, 0xf7, 0xc7, 0xcc, 0xf3, 0x3e, 0xf8, 0x8a, 0x1f, 0xc4, 0x76, 0xca, 0x99, 0x64, 185 0x44, 0xf3, 0x83, 0x78, 0x74, 0x3b, 0x64, 0x21, 0x53, 0x67, 0xa7, 0xfc, 0xaa, 0xa4, 0x91, 0x19, 186 0x32, 0x16, 0x2e, 0xc0, 0x51, 0x27, 0x3f, 0x9b, 0x3b, 0x92, 0xc6, 0x20, 0xa4, 0x17, 0xa7, 0x75, 187 0x83, 0xd1, 0x6f, 0x98, 0x65, 0xdc, 0x93, 0x94, 0x25, 0x95, 0x7e, 0xfc, 0x47, 0xc3, 0x87, 0xd3, 188 0x3c, 0x09, 0x9e, 0x27, 0x73, 0x46, 0xee, 0xe3, 0x9b, 0x67, 0x9e, 0x04, 0x21, 0xdd, 0x05, 0x0b, 189 0x2e, 0x4e, 0x81, 0x86, 0x91, 0xd4, 0xd1, 0x18, 0x59, 0xc3, 0xc9, 0xa6, 0x40, 0x3e, 0xe0, 0x1b, 190 0xed, 0xa2, 0x27, 0x22, 0x7d, 0x30, 0x46, 0xd6, 0x55, 0xf7, 0xf1, 0x72, 0x65, 0x5e, 0xfa, 0xb9, 191 0x32, 0x1f, 0x84, 0x54, 0x46, 0x99, 0x6f, 0x07, 0x2c, 0x76, 0xa2, 0x3c, 0x05, 0xbe, 0x80, 0x59, 192 0x08, 0xdc, 0xf1, 0x33, 0xce, 0xd9, 0x47, 0xc7, 0xa7, 0x89, 0xc7, 0x73, 0xfb, 0x14, 0x3e, 0xb9, 193 0xb9, 0x04, 0x31, 0xe9, 0xd3, 0xc8, 0x7b, 0x7c, 0xad, 0x2a, 0x9d, 0xa4, 0xa9, 0xc2, 0x6b, 0xfb, 194 0xe0, 0xbb, 0x2c, 0xf2, 0xb2, 0x73, 0xfb, 0x73, 0x1a, 0x83, 0x3e, 0x1c, 0x23, 0xeb, 0xe8, 0xe1, 195 0xc8, 0xae, 0x2c, 0xb3, 0x1b, 0xcb, 0xec, 0xf3, 0xc6, 0x53, 0xf7, 0xb0, 0xfc, 0xf5, 0xe7, 0x5f, 196 0x26, 0x9a, 0xf4, 0x87, 0xc9, 0x1b, 0x7c, 0xab, 0x55, 0x9a, 0x02, 0x24, 0x8a, 0x79, 0x79, 0x07, 197 0xe6, 0x36, 0x00, 0x79, 0xdd, 0xe1, 0x3e, 0xad, 0xb7, 0xa7, 0x1f, 0x28, 0xee, 0xdd, 0x0d, 0x6e, 198 0xd3, 0x50, 0x61, 0xbf, 0xf4, 0xb1, 0x8d, 0x7c, 0xfc, 0x6d, 0x80, 0xaf, 0xbf, 0x02, 0x2e, 0xa8, 199 0x90, 0x30, 0x9b, 0x4a, 0x4f, 0x02, 0xb9, 0xc0, 0x77, 0x6a, 0x73, 0x4e, 0xe6, 0x12, 0xf8, 0x99, 200 0x57, 0xcf, 0xa8, 0x04, 0xfc, 0xb7, 0xed, 0xdb, 0x99, 0xe4, 0x45, 0xb9, 0xdb, 0xb6, 0xf9, 0x83, 201 0x1d, 0x8c, 0xea, 0x8e, 0x12, 0xab, 0x5c, 0x65, 0x37, 0xb4, 0x9a, 0x0a, 0x6d, 0xbf, 0x4c, 0xde, 202 0xe2, 0xa3, 0x67, 0x90, 0x80, 0xa0, 0x42, 0xe5, 0x69, 0xb8, 0xcf, 0xc3, 0xda, 0x24, 0xf7, 0xc9, 203 0xb2, 0x30, 0xd0, 0xf7, 0xc2, 0x40, 0x3f, 0x0a, 0x03, 0xfd, 0x2e, 0x0c, 0xf4, 0x75, 0x6d, 0xa0, 204 0xe5, 0xda, 0x40, 0xef, 0xee, 0xfd, 0x83, 0x1a, 0xc4, 0xfe, 0x81, 0x7a, 0xec, 0xa3, 0xbf, 0x01, 205 0x00, 0x00, 0xff, 0xff, 0x6e, 0x6b, 0x06, 0x93, 0xf3, 0x03, 0x00, 0x00, 206 } 207 208 func (m *SyncInfo) Marshal() (dAtA []byte, err error) { 209 size := m.Size() 210 dAtA = make([]byte, size) 211 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 212 if err != nil { 213 return nil, err 214 } 215 return dAtA[:n], nil 216 } 217 218 func (m *SyncInfo) MarshalTo(dAtA []byte) (int, error) { 219 size := m.Size() 220 return m.MarshalToSizedBuffer(dAtA[:size]) 221 } 222 223 func (m *SyncInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 224 i := len(dAtA) 225 _ = i 226 var l int 227 _ = l 228 if m.XXX_unrecognized != nil { 229 i -= len(m.XXX_unrecognized) 230 copy(dAtA[i:], m.XXX_unrecognized) 231 } 232 n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.LatestBlockDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration):]) 233 if err1 != nil { 234 return 0, err1 235 } 236 i -= n1 237 i = encodeVarintBcm(dAtA, i, uint64(n1)) 238 i-- 239 dAtA[i] = 0x32 240 n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockSeenTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime):]) 241 if err2 != nil { 242 return 0, err2 243 } 244 i -= n2 245 i = encodeVarintBcm(dAtA, i, uint64(n2)) 246 i-- 247 dAtA[i] = 0x2a 248 n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LatestBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime):]) 249 if err3 != nil { 250 return 0, err3 251 } 252 i -= n3 253 i = encodeVarintBcm(dAtA, i, uint64(n3)) 254 i-- 255 dAtA[i] = 0x22 256 { 257 size := m.LatestAppHash.Size() 258 i -= size 259 if _, err := m.LatestAppHash.MarshalTo(dAtA[i:]); err != nil { 260 return 0, err 261 } 262 i = encodeVarintBcm(dAtA, i, uint64(size)) 263 } 264 i-- 265 dAtA[i] = 0x1a 266 { 267 size := m.LatestBlockHash.Size() 268 i -= size 269 if _, err := m.LatestBlockHash.MarshalTo(dAtA[i:]); err != nil { 270 return 0, err 271 } 272 i = encodeVarintBcm(dAtA, i, uint64(size)) 273 } 274 i-- 275 dAtA[i] = 0x12 276 if m.LatestBlockHeight != 0 { 277 i = encodeVarintBcm(dAtA, i, uint64(m.LatestBlockHeight)) 278 i-- 279 dAtA[i] = 0x8 280 } 281 return len(dAtA) - i, nil 282 } 283 284 func (m *PersistedState) Marshal() (dAtA []byte, err error) { 285 size := m.Size() 286 dAtA = make([]byte, size) 287 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 288 if err != nil { 289 return nil, err 290 } 291 return dAtA[:n], nil 292 } 293 294 func (m *PersistedState) MarshalTo(dAtA []byte) (int, error) { 295 size := m.Size() 296 return m.MarshalToSizedBuffer(dAtA[:size]) 297 } 298 299 func (m *PersistedState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 300 i := len(dAtA) 301 _ = i 302 var l int 303 _ = l 304 if m.XXX_unrecognized != nil { 305 i -= len(m.XXX_unrecognized) 306 copy(dAtA[i:], m.XXX_unrecognized) 307 } 308 { 309 size := m.GenesisHash.Size() 310 i -= size 311 if _, err := m.GenesisHash.MarshalTo(dAtA[i:]); err != nil { 312 return 0, err 313 } 314 i = encodeVarintBcm(dAtA, i, uint64(size)) 315 } 316 i-- 317 dAtA[i] = 0x22 318 if m.LastBlockHeight != 0 { 319 i = encodeVarintBcm(dAtA, i, uint64(m.LastBlockHeight)) 320 i-- 321 dAtA[i] = 0x18 322 } 323 n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.LastBlockTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime):]) 324 if err4 != nil { 325 return 0, err4 326 } 327 i -= n4 328 i = encodeVarintBcm(dAtA, i, uint64(n4)) 329 i-- 330 dAtA[i] = 0x12 331 { 332 size := m.AppHashAfterLastBlock.Size() 333 i -= size 334 if _, err := m.AppHashAfterLastBlock.MarshalTo(dAtA[i:]); err != nil { 335 return 0, err 336 } 337 i = encodeVarintBcm(dAtA, i, uint64(size)) 338 } 339 i-- 340 dAtA[i] = 0xa 341 return len(dAtA) - i, nil 342 } 343 344 func encodeVarintBcm(dAtA []byte, offset int, v uint64) int { 345 offset -= sovBcm(v) 346 base := offset 347 for v >= 1<<7 { 348 dAtA[offset] = uint8(v&0x7f | 0x80) 349 v >>= 7 350 offset++ 351 } 352 dAtA[offset] = uint8(v) 353 return base 354 } 355 func (m *SyncInfo) Size() (n int) { 356 if m == nil { 357 return 0 358 } 359 var l int 360 _ = l 361 if m.LatestBlockHeight != 0 { 362 n += 1 + sovBcm(uint64(m.LatestBlockHeight)) 363 } 364 l = m.LatestBlockHash.Size() 365 n += 1 + l + sovBcm(uint64(l)) 366 l = m.LatestAppHash.Size() 367 n += 1 + l + sovBcm(uint64(l)) 368 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockTime) 369 n += 1 + l + sovBcm(uint64(l)) 370 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LatestBlockSeenTime) 371 n += 1 + l + sovBcm(uint64(l)) 372 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.LatestBlockDuration) 373 n += 1 + l + sovBcm(uint64(l)) 374 if m.XXX_unrecognized != nil { 375 n += len(m.XXX_unrecognized) 376 } 377 return n 378 } 379 380 func (m *PersistedState) Size() (n int) { 381 if m == nil { 382 return 0 383 } 384 var l int 385 _ = l 386 l = m.AppHashAfterLastBlock.Size() 387 n += 1 + l + sovBcm(uint64(l)) 388 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.LastBlockTime) 389 n += 1 + l + sovBcm(uint64(l)) 390 if m.LastBlockHeight != 0 { 391 n += 1 + sovBcm(uint64(m.LastBlockHeight)) 392 } 393 l = m.GenesisHash.Size() 394 n += 1 + l + sovBcm(uint64(l)) 395 if m.XXX_unrecognized != nil { 396 n += len(m.XXX_unrecognized) 397 } 398 return n 399 } 400 401 func sovBcm(x uint64) (n int) { 402 return (math_bits.Len64(x|1) + 6) / 7 403 } 404 func sozBcm(x uint64) (n int) { 405 return sovBcm(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 406 } 407 func (m *SyncInfo) Unmarshal(dAtA []byte) error { 408 l := len(dAtA) 409 iNdEx := 0 410 for iNdEx < l { 411 preIndex := iNdEx 412 var wire uint64 413 for shift := uint(0); ; shift += 7 { 414 if shift >= 64 { 415 return ErrIntOverflowBcm 416 } 417 if iNdEx >= l { 418 return io.ErrUnexpectedEOF 419 } 420 b := dAtA[iNdEx] 421 iNdEx++ 422 wire |= uint64(b&0x7F) << shift 423 if b < 0x80 { 424 break 425 } 426 } 427 fieldNum := int32(wire >> 3) 428 wireType := int(wire & 0x7) 429 if wireType == 4 { 430 return fmt.Errorf("proto: SyncInfo: wiretype end group for non-group") 431 } 432 if fieldNum <= 0 { 433 return fmt.Errorf("proto: SyncInfo: illegal tag %d (wire type %d)", fieldNum, wire) 434 } 435 switch fieldNum { 436 case 1: 437 if wireType != 0 { 438 return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHeight", wireType) 439 } 440 m.LatestBlockHeight = 0 441 for shift := uint(0); ; shift += 7 { 442 if shift >= 64 { 443 return ErrIntOverflowBcm 444 } 445 if iNdEx >= l { 446 return io.ErrUnexpectedEOF 447 } 448 b := dAtA[iNdEx] 449 iNdEx++ 450 m.LatestBlockHeight |= uint64(b&0x7F) << shift 451 if b < 0x80 { 452 break 453 } 454 } 455 case 2: 456 if wireType != 2 { 457 return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHash", wireType) 458 } 459 var byteLen int 460 for shift := uint(0); ; shift += 7 { 461 if shift >= 64 { 462 return ErrIntOverflowBcm 463 } 464 if iNdEx >= l { 465 return io.ErrUnexpectedEOF 466 } 467 b := dAtA[iNdEx] 468 iNdEx++ 469 byteLen |= int(b&0x7F) << shift 470 if b < 0x80 { 471 break 472 } 473 } 474 if byteLen < 0 { 475 return ErrInvalidLengthBcm 476 } 477 postIndex := iNdEx + byteLen 478 if postIndex < 0 { 479 return ErrInvalidLengthBcm 480 } 481 if postIndex > l { 482 return io.ErrUnexpectedEOF 483 } 484 if err := m.LatestBlockHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 485 return err 486 } 487 iNdEx = postIndex 488 case 3: 489 if wireType != 2 { 490 return fmt.Errorf("proto: wrong wireType = %d for field LatestAppHash", wireType) 491 } 492 var byteLen int 493 for shift := uint(0); ; shift += 7 { 494 if shift >= 64 { 495 return ErrIntOverflowBcm 496 } 497 if iNdEx >= l { 498 return io.ErrUnexpectedEOF 499 } 500 b := dAtA[iNdEx] 501 iNdEx++ 502 byteLen |= int(b&0x7F) << shift 503 if b < 0x80 { 504 break 505 } 506 } 507 if byteLen < 0 { 508 return ErrInvalidLengthBcm 509 } 510 postIndex := iNdEx + byteLen 511 if postIndex < 0 { 512 return ErrInvalidLengthBcm 513 } 514 if postIndex > l { 515 return io.ErrUnexpectedEOF 516 } 517 if err := m.LatestAppHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 518 return err 519 } 520 iNdEx = postIndex 521 case 4: 522 if wireType != 2 { 523 return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockTime", wireType) 524 } 525 var msglen int 526 for shift := uint(0); ; shift += 7 { 527 if shift >= 64 { 528 return ErrIntOverflowBcm 529 } 530 if iNdEx >= l { 531 return io.ErrUnexpectedEOF 532 } 533 b := dAtA[iNdEx] 534 iNdEx++ 535 msglen |= int(b&0x7F) << shift 536 if b < 0x80 { 537 break 538 } 539 } 540 if msglen < 0 { 541 return ErrInvalidLengthBcm 542 } 543 postIndex := iNdEx + msglen 544 if postIndex < 0 { 545 return ErrInvalidLengthBcm 546 } 547 if postIndex > l { 548 return io.ErrUnexpectedEOF 549 } 550 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LatestBlockTime, dAtA[iNdEx:postIndex]); err != nil { 551 return err 552 } 553 iNdEx = postIndex 554 case 5: 555 if wireType != 2 { 556 return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockSeenTime", wireType) 557 } 558 var msglen int 559 for shift := uint(0); ; shift += 7 { 560 if shift >= 64 { 561 return ErrIntOverflowBcm 562 } 563 if iNdEx >= l { 564 return io.ErrUnexpectedEOF 565 } 566 b := dAtA[iNdEx] 567 iNdEx++ 568 msglen |= int(b&0x7F) << shift 569 if b < 0x80 { 570 break 571 } 572 } 573 if msglen < 0 { 574 return ErrInvalidLengthBcm 575 } 576 postIndex := iNdEx + msglen 577 if postIndex < 0 { 578 return ErrInvalidLengthBcm 579 } 580 if postIndex > l { 581 return io.ErrUnexpectedEOF 582 } 583 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LatestBlockSeenTime, dAtA[iNdEx:postIndex]); err != nil { 584 return err 585 } 586 iNdEx = postIndex 587 case 6: 588 if wireType != 2 { 589 return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockDuration", wireType) 590 } 591 var msglen int 592 for shift := uint(0); ; shift += 7 { 593 if shift >= 64 { 594 return ErrIntOverflowBcm 595 } 596 if iNdEx >= l { 597 return io.ErrUnexpectedEOF 598 } 599 b := dAtA[iNdEx] 600 iNdEx++ 601 msglen |= int(b&0x7F) << shift 602 if b < 0x80 { 603 break 604 } 605 } 606 if msglen < 0 { 607 return ErrInvalidLengthBcm 608 } 609 postIndex := iNdEx + msglen 610 if postIndex < 0 { 611 return ErrInvalidLengthBcm 612 } 613 if postIndex > l { 614 return io.ErrUnexpectedEOF 615 } 616 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.LatestBlockDuration, dAtA[iNdEx:postIndex]); err != nil { 617 return err 618 } 619 iNdEx = postIndex 620 default: 621 iNdEx = preIndex 622 skippy, err := skipBcm(dAtA[iNdEx:]) 623 if err != nil { 624 return err 625 } 626 if (skippy < 0) || (iNdEx+skippy) < 0 { 627 return ErrInvalidLengthBcm 628 } 629 if (iNdEx + skippy) > l { 630 return io.ErrUnexpectedEOF 631 } 632 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 633 iNdEx += skippy 634 } 635 } 636 637 if iNdEx > l { 638 return io.ErrUnexpectedEOF 639 } 640 return nil 641 } 642 func (m *PersistedState) Unmarshal(dAtA []byte) error { 643 l := len(dAtA) 644 iNdEx := 0 645 for iNdEx < l { 646 preIndex := iNdEx 647 var wire uint64 648 for shift := uint(0); ; shift += 7 { 649 if shift >= 64 { 650 return ErrIntOverflowBcm 651 } 652 if iNdEx >= l { 653 return io.ErrUnexpectedEOF 654 } 655 b := dAtA[iNdEx] 656 iNdEx++ 657 wire |= uint64(b&0x7F) << shift 658 if b < 0x80 { 659 break 660 } 661 } 662 fieldNum := int32(wire >> 3) 663 wireType := int(wire & 0x7) 664 if wireType == 4 { 665 return fmt.Errorf("proto: PersistedState: wiretype end group for non-group") 666 } 667 if fieldNum <= 0 { 668 return fmt.Errorf("proto: PersistedState: illegal tag %d (wire type %d)", fieldNum, wire) 669 } 670 switch fieldNum { 671 case 1: 672 if wireType != 2 { 673 return fmt.Errorf("proto: wrong wireType = %d for field AppHashAfterLastBlock", wireType) 674 } 675 var byteLen int 676 for shift := uint(0); ; shift += 7 { 677 if shift >= 64 { 678 return ErrIntOverflowBcm 679 } 680 if iNdEx >= l { 681 return io.ErrUnexpectedEOF 682 } 683 b := dAtA[iNdEx] 684 iNdEx++ 685 byteLen |= int(b&0x7F) << shift 686 if b < 0x80 { 687 break 688 } 689 } 690 if byteLen < 0 { 691 return ErrInvalidLengthBcm 692 } 693 postIndex := iNdEx + byteLen 694 if postIndex < 0 { 695 return ErrInvalidLengthBcm 696 } 697 if postIndex > l { 698 return io.ErrUnexpectedEOF 699 } 700 if err := m.AppHashAfterLastBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 701 return err 702 } 703 iNdEx = postIndex 704 case 2: 705 if wireType != 2 { 706 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockTime", wireType) 707 } 708 var msglen int 709 for shift := uint(0); ; shift += 7 { 710 if shift >= 64 { 711 return ErrIntOverflowBcm 712 } 713 if iNdEx >= l { 714 return io.ErrUnexpectedEOF 715 } 716 b := dAtA[iNdEx] 717 iNdEx++ 718 msglen |= int(b&0x7F) << shift 719 if b < 0x80 { 720 break 721 } 722 } 723 if msglen < 0 { 724 return ErrInvalidLengthBcm 725 } 726 postIndex := iNdEx + msglen 727 if postIndex < 0 { 728 return ErrInvalidLengthBcm 729 } 730 if postIndex > l { 731 return io.ErrUnexpectedEOF 732 } 733 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.LastBlockTime, dAtA[iNdEx:postIndex]); err != nil { 734 return err 735 } 736 iNdEx = postIndex 737 case 3: 738 if wireType != 0 { 739 return fmt.Errorf("proto: wrong wireType = %d for field LastBlockHeight", wireType) 740 } 741 m.LastBlockHeight = 0 742 for shift := uint(0); ; shift += 7 { 743 if shift >= 64 { 744 return ErrIntOverflowBcm 745 } 746 if iNdEx >= l { 747 return io.ErrUnexpectedEOF 748 } 749 b := dAtA[iNdEx] 750 iNdEx++ 751 m.LastBlockHeight |= uint64(b&0x7F) << shift 752 if b < 0x80 { 753 break 754 } 755 } 756 case 4: 757 if wireType != 2 { 758 return fmt.Errorf("proto: wrong wireType = %d for field GenesisHash", wireType) 759 } 760 var byteLen int 761 for shift := uint(0); ; shift += 7 { 762 if shift >= 64 { 763 return ErrIntOverflowBcm 764 } 765 if iNdEx >= l { 766 return io.ErrUnexpectedEOF 767 } 768 b := dAtA[iNdEx] 769 iNdEx++ 770 byteLen |= int(b&0x7F) << shift 771 if b < 0x80 { 772 break 773 } 774 } 775 if byteLen < 0 { 776 return ErrInvalidLengthBcm 777 } 778 postIndex := iNdEx + byteLen 779 if postIndex < 0 { 780 return ErrInvalidLengthBcm 781 } 782 if postIndex > l { 783 return io.ErrUnexpectedEOF 784 } 785 if err := m.GenesisHash.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 786 return err 787 } 788 iNdEx = postIndex 789 default: 790 iNdEx = preIndex 791 skippy, err := skipBcm(dAtA[iNdEx:]) 792 if err != nil { 793 return err 794 } 795 if (skippy < 0) || (iNdEx+skippy) < 0 { 796 return ErrInvalidLengthBcm 797 } 798 if (iNdEx + skippy) > l { 799 return io.ErrUnexpectedEOF 800 } 801 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 802 iNdEx += skippy 803 } 804 } 805 806 if iNdEx > l { 807 return io.ErrUnexpectedEOF 808 } 809 return nil 810 } 811 func skipBcm(dAtA []byte) (n int, err error) { 812 l := len(dAtA) 813 iNdEx := 0 814 depth := 0 815 for iNdEx < l { 816 var wire uint64 817 for shift := uint(0); ; shift += 7 { 818 if shift >= 64 { 819 return 0, ErrIntOverflowBcm 820 } 821 if iNdEx >= l { 822 return 0, io.ErrUnexpectedEOF 823 } 824 b := dAtA[iNdEx] 825 iNdEx++ 826 wire |= (uint64(b) & 0x7F) << shift 827 if b < 0x80 { 828 break 829 } 830 } 831 wireType := int(wire & 0x7) 832 switch wireType { 833 case 0: 834 for shift := uint(0); ; shift += 7 { 835 if shift >= 64 { 836 return 0, ErrIntOverflowBcm 837 } 838 if iNdEx >= l { 839 return 0, io.ErrUnexpectedEOF 840 } 841 iNdEx++ 842 if dAtA[iNdEx-1] < 0x80 { 843 break 844 } 845 } 846 case 1: 847 iNdEx += 8 848 case 2: 849 var length int 850 for shift := uint(0); ; shift += 7 { 851 if shift >= 64 { 852 return 0, ErrIntOverflowBcm 853 } 854 if iNdEx >= l { 855 return 0, io.ErrUnexpectedEOF 856 } 857 b := dAtA[iNdEx] 858 iNdEx++ 859 length |= (int(b) & 0x7F) << shift 860 if b < 0x80 { 861 break 862 } 863 } 864 if length < 0 { 865 return 0, ErrInvalidLengthBcm 866 } 867 iNdEx += length 868 case 3: 869 depth++ 870 case 4: 871 if depth == 0 { 872 return 0, ErrUnexpectedEndOfGroupBcm 873 } 874 depth-- 875 case 5: 876 iNdEx += 4 877 default: 878 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 879 } 880 if iNdEx < 0 { 881 return 0, ErrInvalidLengthBcm 882 } 883 if depth == 0 { 884 return iNdEx, nil 885 } 886 } 887 return 0, io.ErrUnexpectedEOF 888 } 889 890 var ( 891 ErrInvalidLengthBcm = fmt.Errorf("proto: negative length found during unmarshaling") 892 ErrIntOverflowBcm = fmt.Errorf("proto: integer overflow") 893 ErrUnexpectedEndOfGroupBcm = fmt.Errorf("proto: unexpected end of group") 894 )