github.com/ari-anchor/sei-tendermint@v0.0.0-20230519144642-dc826b7b56bb/proto/tendermint/consensus/wal.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/consensus/wal.proto 3 4 package consensus 5 6 import ( 7 fmt "fmt" 8 types "github.com/ari-anchor/sei-tendermint/proto/tendermint/types" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 _ "github.com/gogo/protobuf/types" 12 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 13 _ "github.com/golang/protobuf/ptypes/duration" 14 io "io" 15 math "math" 16 math_bits "math/bits" 17 time "time" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var _ = proto.Marshal 22 var _ = fmt.Errorf 23 var _ = math.Inf 24 var _ = time.Kitchen 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // MsgInfo are msgs from the reactor which may update the state 33 type MsgInfo struct { 34 Msg Message `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg"` 35 PeerID string `protobuf:"bytes,2,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"` 36 } 37 38 func (m *MsgInfo) Reset() { *m = MsgInfo{} } 39 func (m *MsgInfo) String() string { return proto.CompactTextString(m) } 40 func (*MsgInfo) ProtoMessage() {} 41 func (*MsgInfo) Descriptor() ([]byte, []int) { 42 return fileDescriptor_ed0b60c2d348ab09, []int{0} 43 } 44 func (m *MsgInfo) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *MsgInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 if deterministic { 49 return xxx_messageInfo_MsgInfo.Marshal(b, m, deterministic) 50 } else { 51 b = b[:cap(b)] 52 n, err := m.MarshalToSizedBuffer(b) 53 if err != nil { 54 return nil, err 55 } 56 return b[:n], nil 57 } 58 } 59 func (m *MsgInfo) XXX_Merge(src proto.Message) { 60 xxx_messageInfo_MsgInfo.Merge(m, src) 61 } 62 func (m *MsgInfo) XXX_Size() int { 63 return m.Size() 64 } 65 func (m *MsgInfo) XXX_DiscardUnknown() { 66 xxx_messageInfo_MsgInfo.DiscardUnknown(m) 67 } 68 69 var xxx_messageInfo_MsgInfo proto.InternalMessageInfo 70 71 func (m *MsgInfo) GetMsg() Message { 72 if m != nil { 73 return m.Msg 74 } 75 return Message{} 76 } 77 78 func (m *MsgInfo) GetPeerID() string { 79 if m != nil { 80 return m.PeerID 81 } 82 return "" 83 } 84 85 // TimeoutInfo internally generated messages which may update the state 86 type TimeoutInfo struct { 87 Duration time.Duration `protobuf:"bytes,1,opt,name=duration,proto3,stdduration" json:"duration"` 88 Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` 89 Round int32 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 90 Step uint32 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` 91 } 92 93 func (m *TimeoutInfo) Reset() { *m = TimeoutInfo{} } 94 func (m *TimeoutInfo) String() string { return proto.CompactTextString(m) } 95 func (*TimeoutInfo) ProtoMessage() {} 96 func (*TimeoutInfo) Descriptor() ([]byte, []int) { 97 return fileDescriptor_ed0b60c2d348ab09, []int{1} 98 } 99 func (m *TimeoutInfo) XXX_Unmarshal(b []byte) error { 100 return m.Unmarshal(b) 101 } 102 func (m *TimeoutInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 103 if deterministic { 104 return xxx_messageInfo_TimeoutInfo.Marshal(b, m, deterministic) 105 } else { 106 b = b[:cap(b)] 107 n, err := m.MarshalToSizedBuffer(b) 108 if err != nil { 109 return nil, err 110 } 111 return b[:n], nil 112 } 113 } 114 func (m *TimeoutInfo) XXX_Merge(src proto.Message) { 115 xxx_messageInfo_TimeoutInfo.Merge(m, src) 116 } 117 func (m *TimeoutInfo) XXX_Size() int { 118 return m.Size() 119 } 120 func (m *TimeoutInfo) XXX_DiscardUnknown() { 121 xxx_messageInfo_TimeoutInfo.DiscardUnknown(m) 122 } 123 124 var xxx_messageInfo_TimeoutInfo proto.InternalMessageInfo 125 126 func (m *TimeoutInfo) GetDuration() time.Duration { 127 if m != nil { 128 return m.Duration 129 } 130 return 0 131 } 132 133 func (m *TimeoutInfo) GetHeight() int64 { 134 if m != nil { 135 return m.Height 136 } 137 return 0 138 } 139 140 func (m *TimeoutInfo) GetRound() int32 { 141 if m != nil { 142 return m.Round 143 } 144 return 0 145 } 146 147 func (m *TimeoutInfo) GetStep() uint32 { 148 if m != nil { 149 return m.Step 150 } 151 return 0 152 } 153 154 // EndHeight marks the end of the given height inside WAL. 155 // @internal used by scripts/wal2json util. 156 type EndHeight struct { 157 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 158 } 159 160 func (m *EndHeight) Reset() { *m = EndHeight{} } 161 func (m *EndHeight) String() string { return proto.CompactTextString(m) } 162 func (*EndHeight) ProtoMessage() {} 163 func (*EndHeight) Descriptor() ([]byte, []int) { 164 return fileDescriptor_ed0b60c2d348ab09, []int{2} 165 } 166 func (m *EndHeight) XXX_Unmarshal(b []byte) error { 167 return m.Unmarshal(b) 168 } 169 func (m *EndHeight) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 170 if deterministic { 171 return xxx_messageInfo_EndHeight.Marshal(b, m, deterministic) 172 } else { 173 b = b[:cap(b)] 174 n, err := m.MarshalToSizedBuffer(b) 175 if err != nil { 176 return nil, err 177 } 178 return b[:n], nil 179 } 180 } 181 func (m *EndHeight) XXX_Merge(src proto.Message) { 182 xxx_messageInfo_EndHeight.Merge(m, src) 183 } 184 func (m *EndHeight) XXX_Size() int { 185 return m.Size() 186 } 187 func (m *EndHeight) XXX_DiscardUnknown() { 188 xxx_messageInfo_EndHeight.DiscardUnknown(m) 189 } 190 191 var xxx_messageInfo_EndHeight proto.InternalMessageInfo 192 193 func (m *EndHeight) GetHeight() int64 { 194 if m != nil { 195 return m.Height 196 } 197 return 0 198 } 199 200 type WALMessage struct { 201 // Types that are valid to be assigned to Sum: 202 // *WALMessage_EventDataRoundState 203 // *WALMessage_MsgInfo 204 // *WALMessage_TimeoutInfo 205 // *WALMessage_EndHeight 206 Sum isWALMessage_Sum `protobuf_oneof:"sum"` 207 } 208 209 func (m *WALMessage) Reset() { *m = WALMessage{} } 210 func (m *WALMessage) String() string { return proto.CompactTextString(m) } 211 func (*WALMessage) ProtoMessage() {} 212 func (*WALMessage) Descriptor() ([]byte, []int) { 213 return fileDescriptor_ed0b60c2d348ab09, []int{3} 214 } 215 func (m *WALMessage) XXX_Unmarshal(b []byte) error { 216 return m.Unmarshal(b) 217 } 218 func (m *WALMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 219 if deterministic { 220 return xxx_messageInfo_WALMessage.Marshal(b, m, deterministic) 221 } else { 222 b = b[:cap(b)] 223 n, err := m.MarshalToSizedBuffer(b) 224 if err != nil { 225 return nil, err 226 } 227 return b[:n], nil 228 } 229 } 230 func (m *WALMessage) XXX_Merge(src proto.Message) { 231 xxx_messageInfo_WALMessage.Merge(m, src) 232 } 233 func (m *WALMessage) XXX_Size() int { 234 return m.Size() 235 } 236 func (m *WALMessage) XXX_DiscardUnknown() { 237 xxx_messageInfo_WALMessage.DiscardUnknown(m) 238 } 239 240 var xxx_messageInfo_WALMessage proto.InternalMessageInfo 241 242 type isWALMessage_Sum interface { 243 isWALMessage_Sum() 244 MarshalTo([]byte) (int, error) 245 Size() int 246 } 247 248 type WALMessage_EventDataRoundState struct { 249 EventDataRoundState *types.EventDataRoundState `protobuf:"bytes,1,opt,name=event_data_round_state,json=eventDataRoundState,proto3,oneof" json:"event_data_round_state,omitempty"` 250 } 251 type WALMessage_MsgInfo struct { 252 MsgInfo *MsgInfo `protobuf:"bytes,2,opt,name=msg_info,json=msgInfo,proto3,oneof" json:"msg_info,omitempty"` 253 } 254 type WALMessage_TimeoutInfo struct { 255 TimeoutInfo *TimeoutInfo `protobuf:"bytes,3,opt,name=timeout_info,json=timeoutInfo,proto3,oneof" json:"timeout_info,omitempty"` 256 } 257 type WALMessage_EndHeight struct { 258 EndHeight *EndHeight `protobuf:"bytes,4,opt,name=end_height,json=endHeight,proto3,oneof" json:"end_height,omitempty"` 259 } 260 261 func (*WALMessage_EventDataRoundState) isWALMessage_Sum() {} 262 func (*WALMessage_MsgInfo) isWALMessage_Sum() {} 263 func (*WALMessage_TimeoutInfo) isWALMessage_Sum() {} 264 func (*WALMessage_EndHeight) isWALMessage_Sum() {} 265 266 func (m *WALMessage) GetSum() isWALMessage_Sum { 267 if m != nil { 268 return m.Sum 269 } 270 return nil 271 } 272 273 func (m *WALMessage) GetEventDataRoundState() *types.EventDataRoundState { 274 if x, ok := m.GetSum().(*WALMessage_EventDataRoundState); ok { 275 return x.EventDataRoundState 276 } 277 return nil 278 } 279 280 func (m *WALMessage) GetMsgInfo() *MsgInfo { 281 if x, ok := m.GetSum().(*WALMessage_MsgInfo); ok { 282 return x.MsgInfo 283 } 284 return nil 285 } 286 287 func (m *WALMessage) GetTimeoutInfo() *TimeoutInfo { 288 if x, ok := m.GetSum().(*WALMessage_TimeoutInfo); ok { 289 return x.TimeoutInfo 290 } 291 return nil 292 } 293 294 func (m *WALMessage) GetEndHeight() *EndHeight { 295 if x, ok := m.GetSum().(*WALMessage_EndHeight); ok { 296 return x.EndHeight 297 } 298 return nil 299 } 300 301 // XXX_OneofWrappers is for the internal use of the proto package. 302 func (*WALMessage) XXX_OneofWrappers() []interface{} { 303 return []interface{}{ 304 (*WALMessage_EventDataRoundState)(nil), 305 (*WALMessage_MsgInfo)(nil), 306 (*WALMessage_TimeoutInfo)(nil), 307 (*WALMessage_EndHeight)(nil), 308 } 309 } 310 311 // TimedWALMessage wraps WALMessage and adds Time for debugging purposes. 312 type TimedWALMessage struct { 313 Time time.Time `protobuf:"bytes,1,opt,name=time,proto3,stdtime" json:"time"` 314 Msg *WALMessage `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` 315 } 316 317 func (m *TimedWALMessage) Reset() { *m = TimedWALMessage{} } 318 func (m *TimedWALMessage) String() string { return proto.CompactTextString(m) } 319 func (*TimedWALMessage) ProtoMessage() {} 320 func (*TimedWALMessage) Descriptor() ([]byte, []int) { 321 return fileDescriptor_ed0b60c2d348ab09, []int{4} 322 } 323 func (m *TimedWALMessage) XXX_Unmarshal(b []byte) error { 324 return m.Unmarshal(b) 325 } 326 func (m *TimedWALMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 327 if deterministic { 328 return xxx_messageInfo_TimedWALMessage.Marshal(b, m, deterministic) 329 } else { 330 b = b[:cap(b)] 331 n, err := m.MarshalToSizedBuffer(b) 332 if err != nil { 333 return nil, err 334 } 335 return b[:n], nil 336 } 337 } 338 func (m *TimedWALMessage) XXX_Merge(src proto.Message) { 339 xxx_messageInfo_TimedWALMessage.Merge(m, src) 340 } 341 func (m *TimedWALMessage) XXX_Size() int { 342 return m.Size() 343 } 344 func (m *TimedWALMessage) XXX_DiscardUnknown() { 345 xxx_messageInfo_TimedWALMessage.DiscardUnknown(m) 346 } 347 348 var xxx_messageInfo_TimedWALMessage proto.InternalMessageInfo 349 350 func (m *TimedWALMessage) GetTime() time.Time { 351 if m != nil { 352 return m.Time 353 } 354 return time.Time{} 355 } 356 357 func (m *TimedWALMessage) GetMsg() *WALMessage { 358 if m != nil { 359 return m.Msg 360 } 361 return nil 362 } 363 364 func init() { 365 proto.RegisterType((*MsgInfo)(nil), "seitendermint.consensus.MsgInfo") 366 proto.RegisterType((*TimeoutInfo)(nil), "seitendermint.consensus.TimeoutInfo") 367 proto.RegisterType((*EndHeight)(nil), "seitendermint.consensus.EndHeight") 368 proto.RegisterType((*WALMessage)(nil), "seitendermint.consensus.WALMessage") 369 proto.RegisterType((*TimedWALMessage)(nil), "seitendermint.consensus.TimedWALMessage") 370 } 371 372 func init() { proto.RegisterFile("tendermint/consensus/wal.proto", fileDescriptor_ed0b60c2d348ab09) } 373 374 var fileDescriptor_ed0b60c2d348ab09 = []byte{ 375 // 554 bytes of a gzipped FileDescriptorProto 376 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0x4f, 0x6b, 0xdb, 0x4e, 377 0x10, 0xd5, 0xc6, 0x8e, 0xff, 0xac, 0x7f, 0x3f, 0x0a, 0x6a, 0x48, 0x5d, 0x43, 0x65, 0x21, 0xf7, 378 0xe0, 0x4b, 0x24, 0x68, 0x29, 0xe4, 0x52, 0x42, 0x5d, 0x07, 0x6c, 0x68, 0xa0, 0x6c, 0x03, 0xa5, 379 0xbd, 0x88, 0xb5, 0x35, 0x96, 0x17, 0xa2, 0x5d, 0xa3, 0x5d, 0xb5, 0xf4, 0xda, 0x4f, 0xe0, 0x63, 380 0xbf, 0x4f, 0x2f, 0x39, 0xe6, 0xd8, 0x53, 0x5a, 0xec, 0x2f, 0x52, 0xb4, 0x2b, 0xdb, 0x22, 0x89, 381 0x7b, 0xdb, 0xd9, 0x79, 0xf3, 0x66, 0xe6, 0xbd, 0x5d, 0xec, 0x28, 0xe0, 0x11, 0xa4, 0x09, 0xe3, 382 0x2a, 0x98, 0x0a, 0x2e, 0x81, 0xcb, 0x4c, 0x06, 0x5f, 0xe9, 0x95, 0xbf, 0x48, 0x85, 0x12, 0xf6, 383 0x13, 0x09, 0x6c, 0x07, 0xf1, 0xb7, 0x90, 0xce, 0x51, 0x2c, 0x62, 0xa1, 0x31, 0x41, 0x7e, 0x32, 384 0xf0, 0x8e, 0xfb, 0x20, 0x9d, 0xfa, 0xb6, 0x00, 0x59, 0x20, 0x9e, 0x95, 0x10, 0xfa, 0x3e, 0x80, 385 0x2f, 0xc0, 0xd5, 0x26, 0xed, 0xc4, 0x42, 0xc4, 0x57, 0x10, 0xe8, 0x68, 0x92, 0xcd, 0x82, 0x28, 386 0x4b, 0xa9, 0x62, 0x82, 0x17, 0xf9, 0xee, 0xdd, 0xbc, 0x62, 0x09, 0x48, 0x45, 0x93, 0x85, 0x01, 387 0x78, 0x73, 0x5c, 0xbf, 0x90, 0xf1, 0x98, 0xcf, 0x84, 0x7d, 0x8a, 0x2b, 0x89, 0x8c, 0xdb, 0xc8, 388 0x45, 0xfd, 0xd6, 0x0b, 0xd7, 0xdf, 0xb3, 0x89, 0x7f, 0x01, 0x52, 0xd2, 0x18, 0x06, 0xd5, 0xeb, 389 0xdb, 0xae, 0x45, 0xf2, 0x12, 0xbb, 0x87, 0xeb, 0x0b, 0x80, 0x34, 0x64, 0x51, 0xfb, 0xc0, 0x45, 390 0xfd, 0xe6, 0x00, 0xaf, 0x6e, 0xbb, 0xb5, 0xf7, 0x00, 0xe9, 0x78, 0x48, 0x6a, 0x79, 0x6a, 0x1c, 391 0x79, 0x4b, 0x84, 0x5b, 0x97, 0x2c, 0x01, 0x91, 0x29, 0xdd, 0xee, 0x0c, 0x37, 0x36, 0xc3, 0x16, 392 0x3d, 0x9f, 0xfa, 0x66, 0x5a, 0x7f, 0x33, 0xad, 0x3f, 0x2c, 0x00, 0x83, 0x46, 0xde, 0xec, 0xc7, 393 0xef, 0x2e, 0x22, 0xdb, 0x22, 0xfb, 0x18, 0xd7, 0xe6, 0xc0, 0xe2, 0xb9, 0xd2, 0x4d, 0x2b, 0xa4, 394 0x88, 0xec, 0x23, 0x7c, 0x98, 0x8a, 0x8c, 0x47, 0xed, 0x8a, 0x8b, 0xfa, 0x87, 0xc4, 0x04, 0xb6, 395 0x8d, 0xab, 0x52, 0xc1, 0xa2, 0x5d, 0x75, 0x51, 0xff, 0x7f, 0xa2, 0xcf, 0x5e, 0x0f, 0x37, 0xcf, 396 0x79, 0x34, 0x32, 0x65, 0x3b, 0x3a, 0x54, 0xa6, 0xf3, 0x7e, 0x1e, 0x60, 0xfc, 0xf1, 0xcd, 0xbb, 397 0x62, 0x6d, 0x3b, 0xc4, 0xc7, 0xda, 0x81, 0x30, 0xa2, 0x8a, 0x86, 0x9a, 0x3b, 0x94, 0x8a, 0x2a, 398 0x28, 0x96, 0xe8, 0xdf, 0x11, 0xce, 0x98, 0x79, 0x9e, 0x97, 0x0c, 0xa9, 0xa2, 0x24, 0x2f, 0xf8, 399 0x90, 0xe3, 0x47, 0x16, 0x79, 0x0c, 0xf7, 0xaf, 0xed, 0xd7, 0xb8, 0x91, 0xc8, 0x38, 0x64, 0x7c, 400 0x26, 0xf4, 0x62, 0xff, 0xf4, 0xc2, 0x58, 0x37, 0xb2, 0x48, 0x3d, 0x29, 0x5c, 0x1c, 0xe3, 0xff, 401 0x94, 0x51, 0xd9, 0x50, 0x54, 0x34, 0xc5, 0xf3, 0xbd, 0x14, 0x25, 0x4b, 0x46, 0x16, 0x69, 0xa9, 402 0x92, 0x43, 0x6f, 0x31, 0x06, 0x1e, 0x85, 0x85, 0x2a, 0x55, 0x4d, 0xe4, 0xed, 0x25, 0xda, 0x2a, 403 0x39, 0xb2, 0x48, 0x13, 0x36, 0xc1, 0xe0, 0x10, 0x57, 0x64, 0x96, 0x78, 0xdf, 0x11, 0x7e, 0x94, 404 0xb7, 0x8a, 0x4a, 0x52, 0x9e, 0xe2, 0x6a, 0xde, 0xae, 0x10, 0xae, 0x73, 0xcf, 0xfd, 0xcb, 0xcd, 405 0x5b, 0x35, 0xf6, 0x2f, 0x73, 0xfb, 0x75, 0x85, 0xfd, 0xca, 0x3c, 0x55, 0x23, 0x4f, 0x6f, 0xef, 406 0x48, 0xbb, 0x5e, 0xfa, 0x9d, 0x0e, 0x3e, 0x5d, 0xaf, 0x1c, 0x74, 0xb3, 0x72, 0xd0, 0x9f, 0x95, 407 0x83, 0x96, 0x6b, 0xc7, 0xba, 0x59, 0x3b, 0xd6, 0xaf, 0xb5, 0x63, 0x7d, 0x3e, 0x8b, 0x99, 0x9a, 408 0x67, 0x13, 0x7f, 0x2a, 0x92, 0x80, 0xa6, 0xec, 0x84, 0xf2, 0xe9, 0x5c, 0xa4, 0x81, 0x04, 0x76, 409 0x52, 0xfa, 0x80, 0xe6, 0xff, 0x3e, 0xf4, 0x67, 0x27, 0x35, 0x9d, 0x7b, 0xf9, 0x37, 0x00, 0x00, 410 0xff, 0xff, 0x95, 0x03, 0xa2, 0xab, 0x21, 0x04, 0x00, 0x00, 411 } 412 413 func (m *MsgInfo) Marshal() (dAtA []byte, err error) { 414 size := m.Size() 415 dAtA = make([]byte, size) 416 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 417 if err != nil { 418 return nil, err 419 } 420 return dAtA[:n], nil 421 } 422 423 func (m *MsgInfo) MarshalTo(dAtA []byte) (int, error) { 424 size := m.Size() 425 return m.MarshalToSizedBuffer(dAtA[:size]) 426 } 427 428 func (m *MsgInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 429 i := len(dAtA) 430 _ = i 431 var l int 432 _ = l 433 if len(m.PeerID) > 0 { 434 i -= len(m.PeerID) 435 copy(dAtA[i:], m.PeerID) 436 i = encodeVarintWal(dAtA, i, uint64(len(m.PeerID))) 437 i-- 438 dAtA[i] = 0x12 439 } 440 { 441 size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) 442 if err != nil { 443 return 0, err 444 } 445 i -= size 446 i = encodeVarintWal(dAtA, i, uint64(size)) 447 } 448 i-- 449 dAtA[i] = 0xa 450 return len(dAtA) - i, nil 451 } 452 453 func (m *TimeoutInfo) Marshal() (dAtA []byte, err error) { 454 size := m.Size() 455 dAtA = make([]byte, size) 456 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 457 if err != nil { 458 return nil, err 459 } 460 return dAtA[:n], nil 461 } 462 463 func (m *TimeoutInfo) MarshalTo(dAtA []byte) (int, error) { 464 size := m.Size() 465 return m.MarshalToSizedBuffer(dAtA[:size]) 466 } 467 468 func (m *TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 469 i := len(dAtA) 470 _ = i 471 var l int 472 _ = l 473 if m.Step != 0 { 474 i = encodeVarintWal(dAtA, i, uint64(m.Step)) 475 i-- 476 dAtA[i] = 0x20 477 } 478 if m.Round != 0 { 479 i = encodeVarintWal(dAtA, i, uint64(m.Round)) 480 i-- 481 dAtA[i] = 0x18 482 } 483 if m.Height != 0 { 484 i = encodeVarintWal(dAtA, i, uint64(m.Height)) 485 i-- 486 dAtA[i] = 0x10 487 } 488 n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) 489 if err2 != nil { 490 return 0, err2 491 } 492 i -= n2 493 i = encodeVarintWal(dAtA, i, uint64(n2)) 494 i-- 495 dAtA[i] = 0xa 496 return len(dAtA) - i, nil 497 } 498 499 func (m *EndHeight) Marshal() (dAtA []byte, err error) { 500 size := m.Size() 501 dAtA = make([]byte, size) 502 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 503 if err != nil { 504 return nil, err 505 } 506 return dAtA[:n], nil 507 } 508 509 func (m *EndHeight) MarshalTo(dAtA []byte) (int, error) { 510 size := m.Size() 511 return m.MarshalToSizedBuffer(dAtA[:size]) 512 } 513 514 func (m *EndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { 515 i := len(dAtA) 516 _ = i 517 var l int 518 _ = l 519 if m.Height != 0 { 520 i = encodeVarintWal(dAtA, i, uint64(m.Height)) 521 i-- 522 dAtA[i] = 0x8 523 } 524 return len(dAtA) - i, nil 525 } 526 527 func (m *WALMessage) Marshal() (dAtA []byte, err error) { 528 size := m.Size() 529 dAtA = make([]byte, size) 530 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 531 if err != nil { 532 return nil, err 533 } 534 return dAtA[:n], nil 535 } 536 537 func (m *WALMessage) MarshalTo(dAtA []byte) (int, error) { 538 size := m.Size() 539 return m.MarshalToSizedBuffer(dAtA[:size]) 540 } 541 542 func (m *WALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { 543 i := len(dAtA) 544 _ = i 545 var l int 546 _ = l 547 if m.Sum != nil { 548 { 549 size := m.Sum.Size() 550 i -= size 551 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 552 return 0, err 553 } 554 } 555 } 556 return len(dAtA) - i, nil 557 } 558 559 func (m *WALMessage_EventDataRoundState) MarshalTo(dAtA []byte) (int, error) { 560 size := m.Size() 561 return m.MarshalToSizedBuffer(dAtA[:size]) 562 } 563 564 func (m *WALMessage_EventDataRoundState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 565 i := len(dAtA) 566 if m.EventDataRoundState != nil { 567 { 568 size, err := m.EventDataRoundState.MarshalToSizedBuffer(dAtA[:i]) 569 if err != nil { 570 return 0, err 571 } 572 i -= size 573 i = encodeVarintWal(dAtA, i, uint64(size)) 574 } 575 i-- 576 dAtA[i] = 0xa 577 } 578 return len(dAtA) - i, nil 579 } 580 func (m *WALMessage_MsgInfo) MarshalTo(dAtA []byte) (int, error) { 581 size := m.Size() 582 return m.MarshalToSizedBuffer(dAtA[:size]) 583 } 584 585 func (m *WALMessage_MsgInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 586 i := len(dAtA) 587 if m.MsgInfo != nil { 588 { 589 size, err := m.MsgInfo.MarshalToSizedBuffer(dAtA[:i]) 590 if err != nil { 591 return 0, err 592 } 593 i -= size 594 i = encodeVarintWal(dAtA, i, uint64(size)) 595 } 596 i-- 597 dAtA[i] = 0x12 598 } 599 return len(dAtA) - i, nil 600 } 601 func (m *WALMessage_TimeoutInfo) MarshalTo(dAtA []byte) (int, error) { 602 size := m.Size() 603 return m.MarshalToSizedBuffer(dAtA[:size]) 604 } 605 606 func (m *WALMessage_TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 607 i := len(dAtA) 608 if m.TimeoutInfo != nil { 609 { 610 size, err := m.TimeoutInfo.MarshalToSizedBuffer(dAtA[:i]) 611 if err != nil { 612 return 0, err 613 } 614 i -= size 615 i = encodeVarintWal(dAtA, i, uint64(size)) 616 } 617 i-- 618 dAtA[i] = 0x1a 619 } 620 return len(dAtA) - i, nil 621 } 622 func (m *WALMessage_EndHeight) MarshalTo(dAtA []byte) (int, error) { 623 size := m.Size() 624 return m.MarshalToSizedBuffer(dAtA[:size]) 625 } 626 627 func (m *WALMessage_EndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { 628 i := len(dAtA) 629 if m.EndHeight != nil { 630 { 631 size, err := m.EndHeight.MarshalToSizedBuffer(dAtA[:i]) 632 if err != nil { 633 return 0, err 634 } 635 i -= size 636 i = encodeVarintWal(dAtA, i, uint64(size)) 637 } 638 i-- 639 dAtA[i] = 0x22 640 } 641 return len(dAtA) - i, nil 642 } 643 func (m *TimedWALMessage) Marshal() (dAtA []byte, err error) { 644 size := m.Size() 645 dAtA = make([]byte, size) 646 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 647 if err != nil { 648 return nil, err 649 } 650 return dAtA[:n], nil 651 } 652 653 func (m *TimedWALMessage) MarshalTo(dAtA []byte) (int, error) { 654 size := m.Size() 655 return m.MarshalToSizedBuffer(dAtA[:size]) 656 } 657 658 func (m *TimedWALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { 659 i := len(dAtA) 660 _ = i 661 var l int 662 _ = l 663 if m.Msg != nil { 664 { 665 size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) 666 if err != nil { 667 return 0, err 668 } 669 i -= size 670 i = encodeVarintWal(dAtA, i, uint64(size)) 671 } 672 i-- 673 dAtA[i] = 0x12 674 } 675 n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) 676 if err8 != nil { 677 return 0, err8 678 } 679 i -= n8 680 i = encodeVarintWal(dAtA, i, uint64(n8)) 681 i-- 682 dAtA[i] = 0xa 683 return len(dAtA) - i, nil 684 } 685 686 func encodeVarintWal(dAtA []byte, offset int, v uint64) int { 687 offset -= sovWal(v) 688 base := offset 689 for v >= 1<<7 { 690 dAtA[offset] = uint8(v&0x7f | 0x80) 691 v >>= 7 692 offset++ 693 } 694 dAtA[offset] = uint8(v) 695 return base 696 } 697 func (m *MsgInfo) Size() (n int) { 698 if m == nil { 699 return 0 700 } 701 var l int 702 _ = l 703 l = m.Msg.Size() 704 n += 1 + l + sovWal(uint64(l)) 705 l = len(m.PeerID) 706 if l > 0 { 707 n += 1 + l + sovWal(uint64(l)) 708 } 709 return n 710 } 711 712 func (m *TimeoutInfo) Size() (n int) { 713 if m == nil { 714 return 0 715 } 716 var l int 717 _ = l 718 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) 719 n += 1 + l + sovWal(uint64(l)) 720 if m.Height != 0 { 721 n += 1 + sovWal(uint64(m.Height)) 722 } 723 if m.Round != 0 { 724 n += 1 + sovWal(uint64(m.Round)) 725 } 726 if m.Step != 0 { 727 n += 1 + sovWal(uint64(m.Step)) 728 } 729 return n 730 } 731 732 func (m *EndHeight) Size() (n int) { 733 if m == nil { 734 return 0 735 } 736 var l int 737 _ = l 738 if m.Height != 0 { 739 n += 1 + sovWal(uint64(m.Height)) 740 } 741 return n 742 } 743 744 func (m *WALMessage) Size() (n int) { 745 if m == nil { 746 return 0 747 } 748 var l int 749 _ = l 750 if m.Sum != nil { 751 n += m.Sum.Size() 752 } 753 return n 754 } 755 756 func (m *WALMessage_EventDataRoundState) Size() (n int) { 757 if m == nil { 758 return 0 759 } 760 var l int 761 _ = l 762 if m.EventDataRoundState != nil { 763 l = m.EventDataRoundState.Size() 764 n += 1 + l + sovWal(uint64(l)) 765 } 766 return n 767 } 768 func (m *WALMessage_MsgInfo) Size() (n int) { 769 if m == nil { 770 return 0 771 } 772 var l int 773 _ = l 774 if m.MsgInfo != nil { 775 l = m.MsgInfo.Size() 776 n += 1 + l + sovWal(uint64(l)) 777 } 778 return n 779 } 780 func (m *WALMessage_TimeoutInfo) Size() (n int) { 781 if m == nil { 782 return 0 783 } 784 var l int 785 _ = l 786 if m.TimeoutInfo != nil { 787 l = m.TimeoutInfo.Size() 788 n += 1 + l + sovWal(uint64(l)) 789 } 790 return n 791 } 792 func (m *WALMessage_EndHeight) Size() (n int) { 793 if m == nil { 794 return 0 795 } 796 var l int 797 _ = l 798 if m.EndHeight != nil { 799 l = m.EndHeight.Size() 800 n += 1 + l + sovWal(uint64(l)) 801 } 802 return n 803 } 804 func (m *TimedWALMessage) Size() (n int) { 805 if m == nil { 806 return 0 807 } 808 var l int 809 _ = l 810 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) 811 n += 1 + l + sovWal(uint64(l)) 812 if m.Msg != nil { 813 l = m.Msg.Size() 814 n += 1 + l + sovWal(uint64(l)) 815 } 816 return n 817 } 818 819 func sovWal(x uint64) (n int) { 820 return (math_bits.Len64(x|1) + 6) / 7 821 } 822 func sozWal(x uint64) (n int) { 823 return sovWal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 824 } 825 func (m *MsgInfo) Unmarshal(dAtA []byte) error { 826 l := len(dAtA) 827 iNdEx := 0 828 for iNdEx < l { 829 preIndex := iNdEx 830 var wire uint64 831 for shift := uint(0); ; shift += 7 { 832 if shift >= 64 { 833 return ErrIntOverflowWal 834 } 835 if iNdEx >= l { 836 return io.ErrUnexpectedEOF 837 } 838 b := dAtA[iNdEx] 839 iNdEx++ 840 wire |= uint64(b&0x7F) << shift 841 if b < 0x80 { 842 break 843 } 844 } 845 fieldNum := int32(wire >> 3) 846 wireType := int(wire & 0x7) 847 if wireType == 4 { 848 return fmt.Errorf("proto: MsgInfo: wiretype end group for non-group") 849 } 850 if fieldNum <= 0 { 851 return fmt.Errorf("proto: MsgInfo: illegal tag %d (wire type %d)", fieldNum, wire) 852 } 853 switch fieldNum { 854 case 1: 855 if wireType != 2 { 856 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 857 } 858 var msglen int 859 for shift := uint(0); ; shift += 7 { 860 if shift >= 64 { 861 return ErrIntOverflowWal 862 } 863 if iNdEx >= l { 864 return io.ErrUnexpectedEOF 865 } 866 b := dAtA[iNdEx] 867 iNdEx++ 868 msglen |= int(b&0x7F) << shift 869 if b < 0x80 { 870 break 871 } 872 } 873 if msglen < 0 { 874 return ErrInvalidLengthWal 875 } 876 postIndex := iNdEx + msglen 877 if postIndex < 0 { 878 return ErrInvalidLengthWal 879 } 880 if postIndex > l { 881 return io.ErrUnexpectedEOF 882 } 883 if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 884 return err 885 } 886 iNdEx = postIndex 887 case 2: 888 if wireType != 2 { 889 return fmt.Errorf("proto: wrong wireType = %d for field PeerID", wireType) 890 } 891 var stringLen uint64 892 for shift := uint(0); ; shift += 7 { 893 if shift >= 64 { 894 return ErrIntOverflowWal 895 } 896 if iNdEx >= l { 897 return io.ErrUnexpectedEOF 898 } 899 b := dAtA[iNdEx] 900 iNdEx++ 901 stringLen |= uint64(b&0x7F) << shift 902 if b < 0x80 { 903 break 904 } 905 } 906 intStringLen := int(stringLen) 907 if intStringLen < 0 { 908 return ErrInvalidLengthWal 909 } 910 postIndex := iNdEx + intStringLen 911 if postIndex < 0 { 912 return ErrInvalidLengthWal 913 } 914 if postIndex > l { 915 return io.ErrUnexpectedEOF 916 } 917 m.PeerID = string(dAtA[iNdEx:postIndex]) 918 iNdEx = postIndex 919 default: 920 iNdEx = preIndex 921 skippy, err := skipWal(dAtA[iNdEx:]) 922 if err != nil { 923 return err 924 } 925 if (skippy < 0) || (iNdEx+skippy) < 0 { 926 return ErrInvalidLengthWal 927 } 928 if (iNdEx + skippy) > l { 929 return io.ErrUnexpectedEOF 930 } 931 iNdEx += skippy 932 } 933 } 934 935 if iNdEx > l { 936 return io.ErrUnexpectedEOF 937 } 938 return nil 939 } 940 func (m *TimeoutInfo) Unmarshal(dAtA []byte) error { 941 l := len(dAtA) 942 iNdEx := 0 943 for iNdEx < l { 944 preIndex := iNdEx 945 var wire uint64 946 for shift := uint(0); ; shift += 7 { 947 if shift >= 64 { 948 return ErrIntOverflowWal 949 } 950 if iNdEx >= l { 951 return io.ErrUnexpectedEOF 952 } 953 b := dAtA[iNdEx] 954 iNdEx++ 955 wire |= uint64(b&0x7F) << shift 956 if b < 0x80 { 957 break 958 } 959 } 960 fieldNum := int32(wire >> 3) 961 wireType := int(wire & 0x7) 962 if wireType == 4 { 963 return fmt.Errorf("proto: TimeoutInfo: wiretype end group for non-group") 964 } 965 if fieldNum <= 0 { 966 return fmt.Errorf("proto: TimeoutInfo: illegal tag %d (wire type %d)", fieldNum, wire) 967 } 968 switch fieldNum { 969 case 1: 970 if wireType != 2 { 971 return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) 972 } 973 var msglen int 974 for shift := uint(0); ; shift += 7 { 975 if shift >= 64 { 976 return ErrIntOverflowWal 977 } 978 if iNdEx >= l { 979 return io.ErrUnexpectedEOF 980 } 981 b := dAtA[iNdEx] 982 iNdEx++ 983 msglen |= int(b&0x7F) << shift 984 if b < 0x80 { 985 break 986 } 987 } 988 if msglen < 0 { 989 return ErrInvalidLengthWal 990 } 991 postIndex := iNdEx + msglen 992 if postIndex < 0 { 993 return ErrInvalidLengthWal 994 } 995 if postIndex > l { 996 return io.ErrUnexpectedEOF 997 } 998 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { 999 return err 1000 } 1001 iNdEx = postIndex 1002 case 2: 1003 if wireType != 0 { 1004 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1005 } 1006 m.Height = 0 1007 for shift := uint(0); ; shift += 7 { 1008 if shift >= 64 { 1009 return ErrIntOverflowWal 1010 } 1011 if iNdEx >= l { 1012 return io.ErrUnexpectedEOF 1013 } 1014 b := dAtA[iNdEx] 1015 iNdEx++ 1016 m.Height |= int64(b&0x7F) << shift 1017 if b < 0x80 { 1018 break 1019 } 1020 } 1021 case 3: 1022 if wireType != 0 { 1023 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1024 } 1025 m.Round = 0 1026 for shift := uint(0); ; shift += 7 { 1027 if shift >= 64 { 1028 return ErrIntOverflowWal 1029 } 1030 if iNdEx >= l { 1031 return io.ErrUnexpectedEOF 1032 } 1033 b := dAtA[iNdEx] 1034 iNdEx++ 1035 m.Round |= int32(b&0x7F) << shift 1036 if b < 0x80 { 1037 break 1038 } 1039 } 1040 case 4: 1041 if wireType != 0 { 1042 return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) 1043 } 1044 m.Step = 0 1045 for shift := uint(0); ; shift += 7 { 1046 if shift >= 64 { 1047 return ErrIntOverflowWal 1048 } 1049 if iNdEx >= l { 1050 return io.ErrUnexpectedEOF 1051 } 1052 b := dAtA[iNdEx] 1053 iNdEx++ 1054 m.Step |= uint32(b&0x7F) << shift 1055 if b < 0x80 { 1056 break 1057 } 1058 } 1059 default: 1060 iNdEx = preIndex 1061 skippy, err := skipWal(dAtA[iNdEx:]) 1062 if err != nil { 1063 return err 1064 } 1065 if (skippy < 0) || (iNdEx+skippy) < 0 { 1066 return ErrInvalidLengthWal 1067 } 1068 if (iNdEx + skippy) > l { 1069 return io.ErrUnexpectedEOF 1070 } 1071 iNdEx += skippy 1072 } 1073 } 1074 1075 if iNdEx > l { 1076 return io.ErrUnexpectedEOF 1077 } 1078 return nil 1079 } 1080 func (m *EndHeight) Unmarshal(dAtA []byte) error { 1081 l := len(dAtA) 1082 iNdEx := 0 1083 for iNdEx < l { 1084 preIndex := iNdEx 1085 var wire uint64 1086 for shift := uint(0); ; shift += 7 { 1087 if shift >= 64 { 1088 return ErrIntOverflowWal 1089 } 1090 if iNdEx >= l { 1091 return io.ErrUnexpectedEOF 1092 } 1093 b := dAtA[iNdEx] 1094 iNdEx++ 1095 wire |= uint64(b&0x7F) << shift 1096 if b < 0x80 { 1097 break 1098 } 1099 } 1100 fieldNum := int32(wire >> 3) 1101 wireType := int(wire & 0x7) 1102 if wireType == 4 { 1103 return fmt.Errorf("proto: EndHeight: wiretype end group for non-group") 1104 } 1105 if fieldNum <= 0 { 1106 return fmt.Errorf("proto: EndHeight: illegal tag %d (wire type %d)", fieldNum, wire) 1107 } 1108 switch fieldNum { 1109 case 1: 1110 if wireType != 0 { 1111 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1112 } 1113 m.Height = 0 1114 for shift := uint(0); ; shift += 7 { 1115 if shift >= 64 { 1116 return ErrIntOverflowWal 1117 } 1118 if iNdEx >= l { 1119 return io.ErrUnexpectedEOF 1120 } 1121 b := dAtA[iNdEx] 1122 iNdEx++ 1123 m.Height |= int64(b&0x7F) << shift 1124 if b < 0x80 { 1125 break 1126 } 1127 } 1128 default: 1129 iNdEx = preIndex 1130 skippy, err := skipWal(dAtA[iNdEx:]) 1131 if err != nil { 1132 return err 1133 } 1134 if (skippy < 0) || (iNdEx+skippy) < 0 { 1135 return ErrInvalidLengthWal 1136 } 1137 if (iNdEx + skippy) > l { 1138 return io.ErrUnexpectedEOF 1139 } 1140 iNdEx += skippy 1141 } 1142 } 1143 1144 if iNdEx > l { 1145 return io.ErrUnexpectedEOF 1146 } 1147 return nil 1148 } 1149 func (m *WALMessage) Unmarshal(dAtA []byte) error { 1150 l := len(dAtA) 1151 iNdEx := 0 1152 for iNdEx < l { 1153 preIndex := iNdEx 1154 var wire uint64 1155 for shift := uint(0); ; shift += 7 { 1156 if shift >= 64 { 1157 return ErrIntOverflowWal 1158 } 1159 if iNdEx >= l { 1160 return io.ErrUnexpectedEOF 1161 } 1162 b := dAtA[iNdEx] 1163 iNdEx++ 1164 wire |= uint64(b&0x7F) << shift 1165 if b < 0x80 { 1166 break 1167 } 1168 } 1169 fieldNum := int32(wire >> 3) 1170 wireType := int(wire & 0x7) 1171 if wireType == 4 { 1172 return fmt.Errorf("proto: WALMessage: wiretype end group for non-group") 1173 } 1174 if fieldNum <= 0 { 1175 return fmt.Errorf("proto: WALMessage: illegal tag %d (wire type %d)", fieldNum, wire) 1176 } 1177 switch fieldNum { 1178 case 1: 1179 if wireType != 2 { 1180 return fmt.Errorf("proto: wrong wireType = %d for field EventDataRoundState", wireType) 1181 } 1182 var msglen int 1183 for shift := uint(0); ; shift += 7 { 1184 if shift >= 64 { 1185 return ErrIntOverflowWal 1186 } 1187 if iNdEx >= l { 1188 return io.ErrUnexpectedEOF 1189 } 1190 b := dAtA[iNdEx] 1191 iNdEx++ 1192 msglen |= int(b&0x7F) << shift 1193 if b < 0x80 { 1194 break 1195 } 1196 } 1197 if msglen < 0 { 1198 return ErrInvalidLengthWal 1199 } 1200 postIndex := iNdEx + msglen 1201 if postIndex < 0 { 1202 return ErrInvalidLengthWal 1203 } 1204 if postIndex > l { 1205 return io.ErrUnexpectedEOF 1206 } 1207 v := &types.EventDataRoundState{} 1208 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1209 return err 1210 } 1211 m.Sum = &WALMessage_EventDataRoundState{v} 1212 iNdEx = postIndex 1213 case 2: 1214 if wireType != 2 { 1215 return fmt.Errorf("proto: wrong wireType = %d for field MsgInfo", wireType) 1216 } 1217 var msglen int 1218 for shift := uint(0); ; shift += 7 { 1219 if shift >= 64 { 1220 return ErrIntOverflowWal 1221 } 1222 if iNdEx >= l { 1223 return io.ErrUnexpectedEOF 1224 } 1225 b := dAtA[iNdEx] 1226 iNdEx++ 1227 msglen |= int(b&0x7F) << shift 1228 if b < 0x80 { 1229 break 1230 } 1231 } 1232 if msglen < 0 { 1233 return ErrInvalidLengthWal 1234 } 1235 postIndex := iNdEx + msglen 1236 if postIndex < 0 { 1237 return ErrInvalidLengthWal 1238 } 1239 if postIndex > l { 1240 return io.ErrUnexpectedEOF 1241 } 1242 v := &MsgInfo{} 1243 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1244 return err 1245 } 1246 m.Sum = &WALMessage_MsgInfo{v} 1247 iNdEx = postIndex 1248 case 3: 1249 if wireType != 2 { 1250 return fmt.Errorf("proto: wrong wireType = %d for field TimeoutInfo", wireType) 1251 } 1252 var msglen int 1253 for shift := uint(0); ; shift += 7 { 1254 if shift >= 64 { 1255 return ErrIntOverflowWal 1256 } 1257 if iNdEx >= l { 1258 return io.ErrUnexpectedEOF 1259 } 1260 b := dAtA[iNdEx] 1261 iNdEx++ 1262 msglen |= int(b&0x7F) << shift 1263 if b < 0x80 { 1264 break 1265 } 1266 } 1267 if msglen < 0 { 1268 return ErrInvalidLengthWal 1269 } 1270 postIndex := iNdEx + msglen 1271 if postIndex < 0 { 1272 return ErrInvalidLengthWal 1273 } 1274 if postIndex > l { 1275 return io.ErrUnexpectedEOF 1276 } 1277 v := &TimeoutInfo{} 1278 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1279 return err 1280 } 1281 m.Sum = &WALMessage_TimeoutInfo{v} 1282 iNdEx = postIndex 1283 case 4: 1284 if wireType != 2 { 1285 return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) 1286 } 1287 var msglen int 1288 for shift := uint(0); ; shift += 7 { 1289 if shift >= 64 { 1290 return ErrIntOverflowWal 1291 } 1292 if iNdEx >= l { 1293 return io.ErrUnexpectedEOF 1294 } 1295 b := dAtA[iNdEx] 1296 iNdEx++ 1297 msglen |= int(b&0x7F) << shift 1298 if b < 0x80 { 1299 break 1300 } 1301 } 1302 if msglen < 0 { 1303 return ErrInvalidLengthWal 1304 } 1305 postIndex := iNdEx + msglen 1306 if postIndex < 0 { 1307 return ErrInvalidLengthWal 1308 } 1309 if postIndex > l { 1310 return io.ErrUnexpectedEOF 1311 } 1312 v := &EndHeight{} 1313 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1314 return err 1315 } 1316 m.Sum = &WALMessage_EndHeight{v} 1317 iNdEx = postIndex 1318 default: 1319 iNdEx = preIndex 1320 skippy, err := skipWal(dAtA[iNdEx:]) 1321 if err != nil { 1322 return err 1323 } 1324 if (skippy < 0) || (iNdEx+skippy) < 0 { 1325 return ErrInvalidLengthWal 1326 } 1327 if (iNdEx + skippy) > l { 1328 return io.ErrUnexpectedEOF 1329 } 1330 iNdEx += skippy 1331 } 1332 } 1333 1334 if iNdEx > l { 1335 return io.ErrUnexpectedEOF 1336 } 1337 return nil 1338 } 1339 func (m *TimedWALMessage) Unmarshal(dAtA []byte) error { 1340 l := len(dAtA) 1341 iNdEx := 0 1342 for iNdEx < l { 1343 preIndex := iNdEx 1344 var wire uint64 1345 for shift := uint(0); ; shift += 7 { 1346 if shift >= 64 { 1347 return ErrIntOverflowWal 1348 } 1349 if iNdEx >= l { 1350 return io.ErrUnexpectedEOF 1351 } 1352 b := dAtA[iNdEx] 1353 iNdEx++ 1354 wire |= uint64(b&0x7F) << shift 1355 if b < 0x80 { 1356 break 1357 } 1358 } 1359 fieldNum := int32(wire >> 3) 1360 wireType := int(wire & 0x7) 1361 if wireType == 4 { 1362 return fmt.Errorf("proto: TimedWALMessage: wiretype end group for non-group") 1363 } 1364 if fieldNum <= 0 { 1365 return fmt.Errorf("proto: TimedWALMessage: illegal tag %d (wire type %d)", fieldNum, wire) 1366 } 1367 switch fieldNum { 1368 case 1: 1369 if wireType != 2 { 1370 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 1371 } 1372 var msglen int 1373 for shift := uint(0); ; shift += 7 { 1374 if shift >= 64 { 1375 return ErrIntOverflowWal 1376 } 1377 if iNdEx >= l { 1378 return io.ErrUnexpectedEOF 1379 } 1380 b := dAtA[iNdEx] 1381 iNdEx++ 1382 msglen |= int(b&0x7F) << shift 1383 if b < 0x80 { 1384 break 1385 } 1386 } 1387 if msglen < 0 { 1388 return ErrInvalidLengthWal 1389 } 1390 postIndex := iNdEx + msglen 1391 if postIndex < 0 { 1392 return ErrInvalidLengthWal 1393 } 1394 if postIndex > l { 1395 return io.ErrUnexpectedEOF 1396 } 1397 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { 1398 return err 1399 } 1400 iNdEx = postIndex 1401 case 2: 1402 if wireType != 2 { 1403 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 1404 } 1405 var msglen int 1406 for shift := uint(0); ; shift += 7 { 1407 if shift >= 64 { 1408 return ErrIntOverflowWal 1409 } 1410 if iNdEx >= l { 1411 return io.ErrUnexpectedEOF 1412 } 1413 b := dAtA[iNdEx] 1414 iNdEx++ 1415 msglen |= int(b&0x7F) << shift 1416 if b < 0x80 { 1417 break 1418 } 1419 } 1420 if msglen < 0 { 1421 return ErrInvalidLengthWal 1422 } 1423 postIndex := iNdEx + msglen 1424 if postIndex < 0 { 1425 return ErrInvalidLengthWal 1426 } 1427 if postIndex > l { 1428 return io.ErrUnexpectedEOF 1429 } 1430 if m.Msg == nil { 1431 m.Msg = &WALMessage{} 1432 } 1433 if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1434 return err 1435 } 1436 iNdEx = postIndex 1437 default: 1438 iNdEx = preIndex 1439 skippy, err := skipWal(dAtA[iNdEx:]) 1440 if err != nil { 1441 return err 1442 } 1443 if (skippy < 0) || (iNdEx+skippy) < 0 { 1444 return ErrInvalidLengthWal 1445 } 1446 if (iNdEx + skippy) > l { 1447 return io.ErrUnexpectedEOF 1448 } 1449 iNdEx += skippy 1450 } 1451 } 1452 1453 if iNdEx > l { 1454 return io.ErrUnexpectedEOF 1455 } 1456 return nil 1457 } 1458 func skipWal(dAtA []byte) (n int, err error) { 1459 l := len(dAtA) 1460 iNdEx := 0 1461 depth := 0 1462 for iNdEx < l { 1463 var wire uint64 1464 for shift := uint(0); ; shift += 7 { 1465 if shift >= 64 { 1466 return 0, ErrIntOverflowWal 1467 } 1468 if iNdEx >= l { 1469 return 0, io.ErrUnexpectedEOF 1470 } 1471 b := dAtA[iNdEx] 1472 iNdEx++ 1473 wire |= (uint64(b) & 0x7F) << shift 1474 if b < 0x80 { 1475 break 1476 } 1477 } 1478 wireType := int(wire & 0x7) 1479 switch wireType { 1480 case 0: 1481 for shift := uint(0); ; shift += 7 { 1482 if shift >= 64 { 1483 return 0, ErrIntOverflowWal 1484 } 1485 if iNdEx >= l { 1486 return 0, io.ErrUnexpectedEOF 1487 } 1488 iNdEx++ 1489 if dAtA[iNdEx-1] < 0x80 { 1490 break 1491 } 1492 } 1493 case 1: 1494 iNdEx += 8 1495 case 2: 1496 var length int 1497 for shift := uint(0); ; shift += 7 { 1498 if shift >= 64 { 1499 return 0, ErrIntOverflowWal 1500 } 1501 if iNdEx >= l { 1502 return 0, io.ErrUnexpectedEOF 1503 } 1504 b := dAtA[iNdEx] 1505 iNdEx++ 1506 length |= (int(b) & 0x7F) << shift 1507 if b < 0x80 { 1508 break 1509 } 1510 } 1511 if length < 0 { 1512 return 0, ErrInvalidLengthWal 1513 } 1514 iNdEx += length 1515 case 3: 1516 depth++ 1517 case 4: 1518 if depth == 0 { 1519 return 0, ErrUnexpectedEndOfGroupWal 1520 } 1521 depth-- 1522 case 5: 1523 iNdEx += 4 1524 default: 1525 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1526 } 1527 if iNdEx < 0 { 1528 return 0, ErrInvalidLengthWal 1529 } 1530 if depth == 0 { 1531 return iNdEx, nil 1532 } 1533 } 1534 return 0, io.ErrUnexpectedEOF 1535 } 1536 1537 var ( 1538 ErrInvalidLengthWal = fmt.Errorf("proto: negative length found during unmarshaling") 1539 ErrIntOverflowWal = fmt.Errorf("proto: integer overflow") 1540 ErrUnexpectedEndOfGroupWal = fmt.Errorf("proto: unexpected end of group") 1541 )