github.com/supragya/TendermintConnector@v0.0.0-20210619045051-113e32b84fb1/chains/tm34/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 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 _ "github.com/gogo/protobuf/types" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 _ "github.com/golang/protobuf/ptypes/duration" 13 types "github.com/supragya/TendermintConnector/chains/tm34/proto/tendermint/types" 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), "tendermint.consensus.MsgInfo") 366 proto.RegisterType((*TimeoutInfo)(nil), "tendermint.consensus.TimeoutInfo") 367 proto.RegisterType((*EndHeight)(nil), "tendermint.consensus.EndHeight") 368 proto.RegisterType((*WALMessage)(nil), "tendermint.consensus.WALMessage") 369 proto.RegisterType((*TimedWALMessage)(nil), "tendermint.consensus.TimedWALMessage") 370 } 371 372 func init() { proto.RegisterFile("tendermint/consensus/wal.proto", fileDescriptor_ed0b60c2d348ab09) } 373 374 var fileDescriptor_ed0b60c2d348ab09 = []byte{ 375 // 562 bytes of a gzipped FileDescriptorProto 376 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xdd, 0x8a, 0xd3, 0x40, 377 0x14, 0x4e, 0xb6, 0xdd, 0xfe, 0x4c, 0x15, 0x21, 0x96, 0xa5, 0x16, 0x36, 0x8d, 0x5d, 0x84, 0x5e, 378 0x25, 0xb0, 0xab, 0x20, 0xde, 0xa8, 0xb5, 0x2b, 0x2d, 0xb8, 0x22, 0x63, 0x41, 0x10, 0x21, 0x4c, 379 0x9b, 0xd3, 0x69, 0x60, 0x33, 0x13, 0x32, 0x13, 0x65, 0xaf, 0x7c, 0x85, 0x5e, 0xfa, 0x26, 0xbe, 380 0xc2, 0x5e, 0xee, 0xa5, 0x57, 0xab, 0xb4, 0x2f, 0x22, 0x99, 0x49, 0xdb, 0xe0, 0xc6, 0xbb, 0x39, 381 0x73, 0xbe, 0x73, 0xbe, 0x73, 0xbe, 0x6f, 0x06, 0xd9, 0x12, 0x58, 0x00, 0x49, 0x14, 0x32, 0xe9, 382 0xcd, 0x39, 0x13, 0xc0, 0x44, 0x2a, 0xbc, 0x6f, 0xe4, 0xd2, 0x8d, 0x13, 0x2e, 0xb9, 0xd5, 0xde, 383 0xe7, 0xdd, 0x5d, 0xbe, 0xdb, 0xa6, 0x9c, 0x72, 0x05, 0xf0, 0xb2, 0x93, 0xc6, 0x76, 0x9d, 0xd2, 384 0x5e, 0xf2, 0x2a, 0x06, 0x91, 0x23, 0x8e, 0x0b, 0x08, 0x75, 0xef, 0xc1, 0x57, 0x60, 0x72, 0x9b, 385 0xb6, 0x29, 0xe7, 0xf4, 0x12, 0x3c, 0x15, 0xcd, 0xd2, 0x85, 0x17, 0xa4, 0x09, 0x91, 0x21, 0x67, 386 0x79, 0xbe, 0xf7, 0x6f, 0x5e, 0x86, 0x11, 0x08, 0x49, 0xa2, 0x58, 0x03, 0xfa, 0x80, 0xea, 0x17, 387 0x82, 0x4e, 0xd8, 0x82, 0x5b, 0xcf, 0x50, 0x25, 0x12, 0xb4, 0x63, 0x3a, 0xe6, 0xa0, 0x75, 0x7a, 388 0xec, 0x96, 0xad, 0xe1, 0x5e, 0x80, 0x10, 0x84, 0xc2, 0xb0, 0x7a, 0x7d, 0xdb, 0x33, 0x70, 0x86, 389 0xb7, 0x4e, 0x50, 0x3d, 0x06, 0x48, 0xfc, 0x30, 0xe8, 0x1c, 0x38, 0xe6, 0xa0, 0x39, 0x44, 0xeb, 390 0xdb, 0x5e, 0xed, 0x03, 0x40, 0x32, 0x19, 0xe1, 0x5a, 0x96, 0x9a, 0x04, 0xfd, 0x95, 0x89, 0x5a, 391 0xd3, 0x30, 0x02, 0x9e, 0x4a, 0xc5, 0xf5, 0x12, 0x35, 0xb6, 0x93, 0xe6, 0x84, 0x8f, 0x5c, 0x3d, 392 0xaa, 0xbb, 0x1d, 0xd5, 0x1d, 0xe5, 0x80, 0x61, 0x23, 0x23, 0xfb, 0xf1, 0xbb, 0x67, 0xe2, 0x5d, 393 0x91, 0x75, 0x84, 0x6a, 0x4b, 0x08, 0xe9, 0x52, 0x2a, 0xd2, 0x0a, 0xce, 0x23, 0xab, 0x8d, 0x0e, 394 0x13, 0x9e, 0xb2, 0xa0, 0x53, 0x71, 0xcc, 0xc1, 0x21, 0xd6, 0x81, 0x65, 0xa1, 0xaa, 0x90, 0x10, 395 0x77, 0xaa, 0x8e, 0x39, 0xb8, 0x8f, 0xd5, 0xb9, 0x7f, 0x82, 0x9a, 0xe7, 0x2c, 0x18, 0xeb, 0xb2, 396 0x7d, 0x3b, 0xb3, 0xd8, 0xae, 0xff, 0xf3, 0x00, 0xa1, 0x4f, 0xaf, 0xdf, 0xe5, 0x6b, 0x5b, 0x5f, 397 0xd0, 0x91, 0x92, 0xdf, 0x0f, 0x88, 0x24, 0xbe, 0xea, 0xed, 0x0b, 0x49, 0x24, 0xe4, 0x4b, 0x3c, 398 0x29, 0xaa, 0xa6, 0x6d, 0x3c, 0xcf, 0xf0, 0x23, 0x22, 0x09, 0xce, 0xd0, 0x1f, 0x33, 0xf0, 0xd8, 399 0xc0, 0x0f, 0xe1, 0xee, 0xb5, 0xf5, 0x02, 0x35, 0x22, 0x41, 0xfd, 0x90, 0x2d, 0xb8, 0xda, 0xea, 400 0xff, 0x2e, 0x68, 0xc7, 0xc6, 0x06, 0xae, 0x47, 0xb9, 0x79, 0x6f, 0xd1, 0x3d, 0xa9, 0xf5, 0xd5, 401 0xf5, 0x15, 0x55, 0xff, 0xb8, 0xbc, 0xbe, 0xe0, 0xc4, 0xd8, 0xc0, 0x2d, 0x59, 0x30, 0xe6, 0x15, 402 0x42, 0xc0, 0x02, 0x3f, 0x17, 0xa3, 0xaa, 0xba, 0xf4, 0xca, 0xbb, 0xec, 0xd4, 0x1b, 0x1b, 0xb8, 403 0x09, 0xdb, 0x60, 0x78, 0x88, 0x2a, 0x22, 0x8d, 0xfa, 0xdf, 0xd1, 0x83, 0x8c, 0x26, 0x28, 0xa8, 404 0xf7, 0x1c, 0x55, 0x33, 0xaa, 0x5c, 0xab, 0xee, 0x1d, 0xc3, 0xa7, 0xdb, 0xb7, 0xa9, 0x1d, 0x5f, 405 0x65, 0x8e, 0xab, 0x0a, 0xeb, 0x54, 0x3f, 0x4d, 0x2d, 0x8a, 0x53, 0x3e, 0xce, 0x9e, 0x48, 0xbd, 406 0xcb, 0xe1, 0xf2, 0x7a, 0x6d, 0x9b, 0x37, 0x6b, 0xdb, 0xfc, 0xb3, 0xb6, 0xcd, 0xd5, 0xc6, 0x36, 407 0x6e, 0x36, 0xb6, 0xf1, 0x6b, 0x63, 0x1b, 0x9f, 0xdf, 0xd3, 0x50, 0x2e, 0xd3, 0x99, 0x3b, 0xe7, 408 0x91, 0x27, 0xd2, 0x38, 0x21, 0xf4, 0x8a, 0x78, 0xd3, 0x5d, 0xcf, 0x37, 0x9c, 0x31, 0x98, 0x4b, 409 0x9e, 0x78, 0xf3, 0x25, 0x09, 0x99, 0xf0, 0x64, 0x74, 0xf6, 0x54, 0xff, 0x20, 0xaf, 0xec, 0xbf, 410 0xce, 0x6a, 0x2a, 0x77, 0xf6, 0x37, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x8b, 0x98, 0xe5, 0x1a, 0x04, 411 0x00, 0x00, 412 } 413 414 func (m *MsgInfo) Marshal() (dAtA []byte, err error) { 415 size := m.Size() 416 dAtA = make([]byte, size) 417 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 418 if err != nil { 419 return nil, err 420 } 421 return dAtA[:n], nil 422 } 423 424 func (m *MsgInfo) MarshalTo(dAtA []byte) (int, error) { 425 size := m.Size() 426 return m.MarshalToSizedBuffer(dAtA[:size]) 427 } 428 429 func (m *MsgInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 430 i := len(dAtA) 431 _ = i 432 var l int 433 _ = l 434 if len(m.PeerID) > 0 { 435 i -= len(m.PeerID) 436 copy(dAtA[i:], m.PeerID) 437 i = encodeVarintWal(dAtA, i, uint64(len(m.PeerID))) 438 i-- 439 dAtA[i] = 0x12 440 } 441 { 442 size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) 443 if err != nil { 444 return 0, err 445 } 446 i -= size 447 i = encodeVarintWal(dAtA, i, uint64(size)) 448 } 449 i-- 450 dAtA[i] = 0xa 451 return len(dAtA) - i, nil 452 } 453 454 func (m *TimeoutInfo) Marshal() (dAtA []byte, err error) { 455 size := m.Size() 456 dAtA = make([]byte, size) 457 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 458 if err != nil { 459 return nil, err 460 } 461 return dAtA[:n], nil 462 } 463 464 func (m *TimeoutInfo) MarshalTo(dAtA []byte) (int, error) { 465 size := m.Size() 466 return m.MarshalToSizedBuffer(dAtA[:size]) 467 } 468 469 func (m *TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 470 i := len(dAtA) 471 _ = i 472 var l int 473 _ = l 474 if m.Step != 0 { 475 i = encodeVarintWal(dAtA, i, uint64(m.Step)) 476 i-- 477 dAtA[i] = 0x20 478 } 479 if m.Round != 0 { 480 i = encodeVarintWal(dAtA, i, uint64(m.Round)) 481 i-- 482 dAtA[i] = 0x18 483 } 484 if m.Height != 0 { 485 i = encodeVarintWal(dAtA, i, uint64(m.Height)) 486 i-- 487 dAtA[i] = 0x10 488 } 489 n2, err2 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.Duration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration):]) 490 if err2 != nil { 491 return 0, err2 492 } 493 i -= n2 494 i = encodeVarintWal(dAtA, i, uint64(n2)) 495 i-- 496 dAtA[i] = 0xa 497 return len(dAtA) - i, nil 498 } 499 500 func (m *EndHeight) Marshal() (dAtA []byte, err error) { 501 size := m.Size() 502 dAtA = make([]byte, size) 503 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 504 if err != nil { 505 return nil, err 506 } 507 return dAtA[:n], nil 508 } 509 510 func (m *EndHeight) MarshalTo(dAtA []byte) (int, error) { 511 size := m.Size() 512 return m.MarshalToSizedBuffer(dAtA[:size]) 513 } 514 515 func (m *EndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { 516 i := len(dAtA) 517 _ = i 518 var l int 519 _ = l 520 if m.Height != 0 { 521 i = encodeVarintWal(dAtA, i, uint64(m.Height)) 522 i-- 523 dAtA[i] = 0x8 524 } 525 return len(dAtA) - i, nil 526 } 527 528 func (m *WALMessage) Marshal() (dAtA []byte, err error) { 529 size := m.Size() 530 dAtA = make([]byte, size) 531 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 532 if err != nil { 533 return nil, err 534 } 535 return dAtA[:n], nil 536 } 537 538 func (m *WALMessage) MarshalTo(dAtA []byte) (int, error) { 539 size := m.Size() 540 return m.MarshalToSizedBuffer(dAtA[:size]) 541 } 542 543 func (m *WALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { 544 i := len(dAtA) 545 _ = i 546 var l int 547 _ = l 548 if m.Sum != nil { 549 { 550 size := m.Sum.Size() 551 i -= size 552 if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { 553 return 0, err 554 } 555 } 556 } 557 return len(dAtA) - i, nil 558 } 559 560 func (m *WALMessage_EventDataRoundState) MarshalTo(dAtA []byte) (int, error) { 561 size := m.Size() 562 return m.MarshalToSizedBuffer(dAtA[:size]) 563 } 564 565 func (m *WALMessage_EventDataRoundState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 566 i := len(dAtA) 567 if m.EventDataRoundState != nil { 568 { 569 size, err := m.EventDataRoundState.MarshalToSizedBuffer(dAtA[:i]) 570 if err != nil { 571 return 0, err 572 } 573 i -= size 574 i = encodeVarintWal(dAtA, i, uint64(size)) 575 } 576 i-- 577 dAtA[i] = 0xa 578 } 579 return len(dAtA) - i, nil 580 } 581 func (m *WALMessage_MsgInfo) MarshalTo(dAtA []byte) (int, error) { 582 size := m.Size() 583 return m.MarshalToSizedBuffer(dAtA[:size]) 584 } 585 586 func (m *WALMessage_MsgInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 587 i := len(dAtA) 588 if m.MsgInfo != nil { 589 { 590 size, err := m.MsgInfo.MarshalToSizedBuffer(dAtA[:i]) 591 if err != nil { 592 return 0, err 593 } 594 i -= size 595 i = encodeVarintWal(dAtA, i, uint64(size)) 596 } 597 i-- 598 dAtA[i] = 0x12 599 } 600 return len(dAtA) - i, nil 601 } 602 func (m *WALMessage_TimeoutInfo) MarshalTo(dAtA []byte) (int, error) { 603 size := m.Size() 604 return m.MarshalToSizedBuffer(dAtA[:size]) 605 } 606 607 func (m *WALMessage_TimeoutInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 608 i := len(dAtA) 609 if m.TimeoutInfo != nil { 610 { 611 size, err := m.TimeoutInfo.MarshalToSizedBuffer(dAtA[:i]) 612 if err != nil { 613 return 0, err 614 } 615 i -= size 616 i = encodeVarintWal(dAtA, i, uint64(size)) 617 } 618 i-- 619 dAtA[i] = 0x1a 620 } 621 return len(dAtA) - i, nil 622 } 623 func (m *WALMessage_EndHeight) MarshalTo(dAtA []byte) (int, error) { 624 size := m.Size() 625 return m.MarshalToSizedBuffer(dAtA[:size]) 626 } 627 628 func (m *WALMessage_EndHeight) MarshalToSizedBuffer(dAtA []byte) (int, error) { 629 i := len(dAtA) 630 if m.EndHeight != nil { 631 { 632 size, err := m.EndHeight.MarshalToSizedBuffer(dAtA[:i]) 633 if err != nil { 634 return 0, err 635 } 636 i -= size 637 i = encodeVarintWal(dAtA, i, uint64(size)) 638 } 639 i-- 640 dAtA[i] = 0x22 641 } 642 return len(dAtA) - i, nil 643 } 644 func (m *TimedWALMessage) Marshal() (dAtA []byte, err error) { 645 size := m.Size() 646 dAtA = make([]byte, size) 647 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 648 if err != nil { 649 return nil, err 650 } 651 return dAtA[:n], nil 652 } 653 654 func (m *TimedWALMessage) MarshalTo(dAtA []byte) (int, error) { 655 size := m.Size() 656 return m.MarshalToSizedBuffer(dAtA[:size]) 657 } 658 659 func (m *TimedWALMessage) MarshalToSizedBuffer(dAtA []byte) (int, error) { 660 i := len(dAtA) 661 _ = i 662 var l int 663 _ = l 664 if m.Msg != nil { 665 { 666 size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) 667 if err != nil { 668 return 0, err 669 } 670 i -= size 671 i = encodeVarintWal(dAtA, i, uint64(size)) 672 } 673 i-- 674 dAtA[i] = 0x12 675 } 676 n8, err8 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):]) 677 if err8 != nil { 678 return 0, err8 679 } 680 i -= n8 681 i = encodeVarintWal(dAtA, i, uint64(n8)) 682 i-- 683 dAtA[i] = 0xa 684 return len(dAtA) - i, nil 685 } 686 687 func encodeVarintWal(dAtA []byte, offset int, v uint64) int { 688 offset -= sovWal(v) 689 base := offset 690 for v >= 1<<7 { 691 dAtA[offset] = uint8(v&0x7f | 0x80) 692 v >>= 7 693 offset++ 694 } 695 dAtA[offset] = uint8(v) 696 return base 697 } 698 func (m *MsgInfo) Size() (n int) { 699 if m == nil { 700 return 0 701 } 702 var l int 703 _ = l 704 l = m.Msg.Size() 705 n += 1 + l + sovWal(uint64(l)) 706 l = len(m.PeerID) 707 if l > 0 { 708 n += 1 + l + sovWal(uint64(l)) 709 } 710 return n 711 } 712 713 func (m *TimeoutInfo) Size() (n int) { 714 if m == nil { 715 return 0 716 } 717 var l int 718 _ = l 719 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.Duration) 720 n += 1 + l + sovWal(uint64(l)) 721 if m.Height != 0 { 722 n += 1 + sovWal(uint64(m.Height)) 723 } 724 if m.Round != 0 { 725 n += 1 + sovWal(uint64(m.Round)) 726 } 727 if m.Step != 0 { 728 n += 1 + sovWal(uint64(m.Step)) 729 } 730 return n 731 } 732 733 func (m *EndHeight) Size() (n int) { 734 if m == nil { 735 return 0 736 } 737 var l int 738 _ = l 739 if m.Height != 0 { 740 n += 1 + sovWal(uint64(m.Height)) 741 } 742 return n 743 } 744 745 func (m *WALMessage) Size() (n int) { 746 if m == nil { 747 return 0 748 } 749 var l int 750 _ = l 751 if m.Sum != nil { 752 n += m.Sum.Size() 753 } 754 return n 755 } 756 757 func (m *WALMessage_EventDataRoundState) Size() (n int) { 758 if m == nil { 759 return 0 760 } 761 var l int 762 _ = l 763 if m.EventDataRoundState != nil { 764 l = m.EventDataRoundState.Size() 765 n += 1 + l + sovWal(uint64(l)) 766 } 767 return n 768 } 769 func (m *WALMessage_MsgInfo) Size() (n int) { 770 if m == nil { 771 return 0 772 } 773 var l int 774 _ = l 775 if m.MsgInfo != nil { 776 l = m.MsgInfo.Size() 777 n += 1 + l + sovWal(uint64(l)) 778 } 779 return n 780 } 781 func (m *WALMessage_TimeoutInfo) Size() (n int) { 782 if m == nil { 783 return 0 784 } 785 var l int 786 _ = l 787 if m.TimeoutInfo != nil { 788 l = m.TimeoutInfo.Size() 789 n += 1 + l + sovWal(uint64(l)) 790 } 791 return n 792 } 793 func (m *WALMessage_EndHeight) Size() (n int) { 794 if m == nil { 795 return 0 796 } 797 var l int 798 _ = l 799 if m.EndHeight != nil { 800 l = m.EndHeight.Size() 801 n += 1 + l + sovWal(uint64(l)) 802 } 803 return n 804 } 805 func (m *TimedWALMessage) Size() (n int) { 806 if m == nil { 807 return 0 808 } 809 var l int 810 _ = l 811 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time) 812 n += 1 + l + sovWal(uint64(l)) 813 if m.Msg != nil { 814 l = m.Msg.Size() 815 n += 1 + l + sovWal(uint64(l)) 816 } 817 return n 818 } 819 820 func sovWal(x uint64) (n int) { 821 return (math_bits.Len64(x|1) + 6) / 7 822 } 823 func sozWal(x uint64) (n int) { 824 return sovWal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 825 } 826 func (m *MsgInfo) Unmarshal(dAtA []byte) error { 827 l := len(dAtA) 828 iNdEx := 0 829 for iNdEx < l { 830 preIndex := iNdEx 831 var wire uint64 832 for shift := uint(0); ; shift += 7 { 833 if shift >= 64 { 834 return ErrIntOverflowWal 835 } 836 if iNdEx >= l { 837 return io.ErrUnexpectedEOF 838 } 839 b := dAtA[iNdEx] 840 iNdEx++ 841 wire |= uint64(b&0x7F) << shift 842 if b < 0x80 { 843 break 844 } 845 } 846 fieldNum := int32(wire >> 3) 847 wireType := int(wire & 0x7) 848 if wireType == 4 { 849 return fmt.Errorf("proto: MsgInfo: wiretype end group for non-group") 850 } 851 if fieldNum <= 0 { 852 return fmt.Errorf("proto: MsgInfo: illegal tag %d (wire type %d)", fieldNum, wire) 853 } 854 switch fieldNum { 855 case 1: 856 if wireType != 2 { 857 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 858 } 859 var msglen int 860 for shift := uint(0); ; shift += 7 { 861 if shift >= 64 { 862 return ErrIntOverflowWal 863 } 864 if iNdEx >= l { 865 return io.ErrUnexpectedEOF 866 } 867 b := dAtA[iNdEx] 868 iNdEx++ 869 msglen |= int(b&0x7F) << shift 870 if b < 0x80 { 871 break 872 } 873 } 874 if msglen < 0 { 875 return ErrInvalidLengthWal 876 } 877 postIndex := iNdEx + msglen 878 if postIndex < 0 { 879 return ErrInvalidLengthWal 880 } 881 if postIndex > l { 882 return io.ErrUnexpectedEOF 883 } 884 if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 885 return err 886 } 887 iNdEx = postIndex 888 case 2: 889 if wireType != 2 { 890 return fmt.Errorf("proto: wrong wireType = %d for field PeerID", wireType) 891 } 892 var stringLen uint64 893 for shift := uint(0); ; shift += 7 { 894 if shift >= 64 { 895 return ErrIntOverflowWal 896 } 897 if iNdEx >= l { 898 return io.ErrUnexpectedEOF 899 } 900 b := dAtA[iNdEx] 901 iNdEx++ 902 stringLen |= uint64(b&0x7F) << shift 903 if b < 0x80 { 904 break 905 } 906 } 907 intStringLen := int(stringLen) 908 if intStringLen < 0 { 909 return ErrInvalidLengthWal 910 } 911 postIndex := iNdEx + intStringLen 912 if postIndex < 0 { 913 return ErrInvalidLengthWal 914 } 915 if postIndex > l { 916 return io.ErrUnexpectedEOF 917 } 918 m.PeerID = string(dAtA[iNdEx:postIndex]) 919 iNdEx = postIndex 920 default: 921 iNdEx = preIndex 922 skippy, err := skipWal(dAtA[iNdEx:]) 923 if err != nil { 924 return err 925 } 926 if (skippy < 0) || (iNdEx+skippy) < 0 { 927 return ErrInvalidLengthWal 928 } 929 if (iNdEx + skippy) > l { 930 return io.ErrUnexpectedEOF 931 } 932 iNdEx += skippy 933 } 934 } 935 936 if iNdEx > l { 937 return io.ErrUnexpectedEOF 938 } 939 return nil 940 } 941 func (m *TimeoutInfo) Unmarshal(dAtA []byte) error { 942 l := len(dAtA) 943 iNdEx := 0 944 for iNdEx < l { 945 preIndex := iNdEx 946 var wire uint64 947 for shift := uint(0); ; shift += 7 { 948 if shift >= 64 { 949 return ErrIntOverflowWal 950 } 951 if iNdEx >= l { 952 return io.ErrUnexpectedEOF 953 } 954 b := dAtA[iNdEx] 955 iNdEx++ 956 wire |= uint64(b&0x7F) << shift 957 if b < 0x80 { 958 break 959 } 960 } 961 fieldNum := int32(wire >> 3) 962 wireType := int(wire & 0x7) 963 if wireType == 4 { 964 return fmt.Errorf("proto: TimeoutInfo: wiretype end group for non-group") 965 } 966 if fieldNum <= 0 { 967 return fmt.Errorf("proto: TimeoutInfo: illegal tag %d (wire type %d)", fieldNum, wire) 968 } 969 switch fieldNum { 970 case 1: 971 if wireType != 2 { 972 return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) 973 } 974 var msglen int 975 for shift := uint(0); ; shift += 7 { 976 if shift >= 64 { 977 return ErrIntOverflowWal 978 } 979 if iNdEx >= l { 980 return io.ErrUnexpectedEOF 981 } 982 b := dAtA[iNdEx] 983 iNdEx++ 984 msglen |= int(b&0x7F) << shift 985 if b < 0x80 { 986 break 987 } 988 } 989 if msglen < 0 { 990 return ErrInvalidLengthWal 991 } 992 postIndex := iNdEx + msglen 993 if postIndex < 0 { 994 return ErrInvalidLengthWal 995 } 996 if postIndex > l { 997 return io.ErrUnexpectedEOF 998 } 999 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil { 1000 return err 1001 } 1002 iNdEx = postIndex 1003 case 2: 1004 if wireType != 0 { 1005 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1006 } 1007 m.Height = 0 1008 for shift := uint(0); ; shift += 7 { 1009 if shift >= 64 { 1010 return ErrIntOverflowWal 1011 } 1012 if iNdEx >= l { 1013 return io.ErrUnexpectedEOF 1014 } 1015 b := dAtA[iNdEx] 1016 iNdEx++ 1017 m.Height |= int64(b&0x7F) << shift 1018 if b < 0x80 { 1019 break 1020 } 1021 } 1022 case 3: 1023 if wireType != 0 { 1024 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1025 } 1026 m.Round = 0 1027 for shift := uint(0); ; shift += 7 { 1028 if shift >= 64 { 1029 return ErrIntOverflowWal 1030 } 1031 if iNdEx >= l { 1032 return io.ErrUnexpectedEOF 1033 } 1034 b := dAtA[iNdEx] 1035 iNdEx++ 1036 m.Round |= int32(b&0x7F) << shift 1037 if b < 0x80 { 1038 break 1039 } 1040 } 1041 case 4: 1042 if wireType != 0 { 1043 return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) 1044 } 1045 m.Step = 0 1046 for shift := uint(0); ; shift += 7 { 1047 if shift >= 64 { 1048 return ErrIntOverflowWal 1049 } 1050 if iNdEx >= l { 1051 return io.ErrUnexpectedEOF 1052 } 1053 b := dAtA[iNdEx] 1054 iNdEx++ 1055 m.Step |= uint32(b&0x7F) << shift 1056 if b < 0x80 { 1057 break 1058 } 1059 } 1060 default: 1061 iNdEx = preIndex 1062 skippy, err := skipWal(dAtA[iNdEx:]) 1063 if err != nil { 1064 return err 1065 } 1066 if (skippy < 0) || (iNdEx+skippy) < 0 { 1067 return ErrInvalidLengthWal 1068 } 1069 if (iNdEx + skippy) > l { 1070 return io.ErrUnexpectedEOF 1071 } 1072 iNdEx += skippy 1073 } 1074 } 1075 1076 if iNdEx > l { 1077 return io.ErrUnexpectedEOF 1078 } 1079 return nil 1080 } 1081 func (m *EndHeight) Unmarshal(dAtA []byte) error { 1082 l := len(dAtA) 1083 iNdEx := 0 1084 for iNdEx < l { 1085 preIndex := iNdEx 1086 var wire uint64 1087 for shift := uint(0); ; shift += 7 { 1088 if shift >= 64 { 1089 return ErrIntOverflowWal 1090 } 1091 if iNdEx >= l { 1092 return io.ErrUnexpectedEOF 1093 } 1094 b := dAtA[iNdEx] 1095 iNdEx++ 1096 wire |= uint64(b&0x7F) << shift 1097 if b < 0x80 { 1098 break 1099 } 1100 } 1101 fieldNum := int32(wire >> 3) 1102 wireType := int(wire & 0x7) 1103 if wireType == 4 { 1104 return fmt.Errorf("proto: EndHeight: wiretype end group for non-group") 1105 } 1106 if fieldNum <= 0 { 1107 return fmt.Errorf("proto: EndHeight: illegal tag %d (wire type %d)", fieldNum, wire) 1108 } 1109 switch fieldNum { 1110 case 1: 1111 if wireType != 0 { 1112 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 1113 } 1114 m.Height = 0 1115 for shift := uint(0); ; shift += 7 { 1116 if shift >= 64 { 1117 return ErrIntOverflowWal 1118 } 1119 if iNdEx >= l { 1120 return io.ErrUnexpectedEOF 1121 } 1122 b := dAtA[iNdEx] 1123 iNdEx++ 1124 m.Height |= int64(b&0x7F) << shift 1125 if b < 0x80 { 1126 break 1127 } 1128 } 1129 default: 1130 iNdEx = preIndex 1131 skippy, err := skipWal(dAtA[iNdEx:]) 1132 if err != nil { 1133 return err 1134 } 1135 if (skippy < 0) || (iNdEx+skippy) < 0 { 1136 return ErrInvalidLengthWal 1137 } 1138 if (iNdEx + skippy) > l { 1139 return io.ErrUnexpectedEOF 1140 } 1141 iNdEx += skippy 1142 } 1143 } 1144 1145 if iNdEx > l { 1146 return io.ErrUnexpectedEOF 1147 } 1148 return nil 1149 } 1150 func (m *WALMessage) Unmarshal(dAtA []byte) error { 1151 l := len(dAtA) 1152 iNdEx := 0 1153 for iNdEx < l { 1154 preIndex := iNdEx 1155 var wire uint64 1156 for shift := uint(0); ; shift += 7 { 1157 if shift >= 64 { 1158 return ErrIntOverflowWal 1159 } 1160 if iNdEx >= l { 1161 return io.ErrUnexpectedEOF 1162 } 1163 b := dAtA[iNdEx] 1164 iNdEx++ 1165 wire |= uint64(b&0x7F) << shift 1166 if b < 0x80 { 1167 break 1168 } 1169 } 1170 fieldNum := int32(wire >> 3) 1171 wireType := int(wire & 0x7) 1172 if wireType == 4 { 1173 return fmt.Errorf("proto: WALMessage: wiretype end group for non-group") 1174 } 1175 if fieldNum <= 0 { 1176 return fmt.Errorf("proto: WALMessage: illegal tag %d (wire type %d)", fieldNum, wire) 1177 } 1178 switch fieldNum { 1179 case 1: 1180 if wireType != 2 { 1181 return fmt.Errorf("proto: wrong wireType = %d for field EventDataRoundState", wireType) 1182 } 1183 var msglen int 1184 for shift := uint(0); ; shift += 7 { 1185 if shift >= 64 { 1186 return ErrIntOverflowWal 1187 } 1188 if iNdEx >= l { 1189 return io.ErrUnexpectedEOF 1190 } 1191 b := dAtA[iNdEx] 1192 iNdEx++ 1193 msglen |= int(b&0x7F) << shift 1194 if b < 0x80 { 1195 break 1196 } 1197 } 1198 if msglen < 0 { 1199 return ErrInvalidLengthWal 1200 } 1201 postIndex := iNdEx + msglen 1202 if postIndex < 0 { 1203 return ErrInvalidLengthWal 1204 } 1205 if postIndex > l { 1206 return io.ErrUnexpectedEOF 1207 } 1208 v := &types.EventDataRoundState{} 1209 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1210 return err 1211 } 1212 m.Sum = &WALMessage_EventDataRoundState{v} 1213 iNdEx = postIndex 1214 case 2: 1215 if wireType != 2 { 1216 return fmt.Errorf("proto: wrong wireType = %d for field MsgInfo", wireType) 1217 } 1218 var msglen int 1219 for shift := uint(0); ; shift += 7 { 1220 if shift >= 64 { 1221 return ErrIntOverflowWal 1222 } 1223 if iNdEx >= l { 1224 return io.ErrUnexpectedEOF 1225 } 1226 b := dAtA[iNdEx] 1227 iNdEx++ 1228 msglen |= int(b&0x7F) << shift 1229 if b < 0x80 { 1230 break 1231 } 1232 } 1233 if msglen < 0 { 1234 return ErrInvalidLengthWal 1235 } 1236 postIndex := iNdEx + msglen 1237 if postIndex < 0 { 1238 return ErrInvalidLengthWal 1239 } 1240 if postIndex > l { 1241 return io.ErrUnexpectedEOF 1242 } 1243 v := &MsgInfo{} 1244 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1245 return err 1246 } 1247 m.Sum = &WALMessage_MsgInfo{v} 1248 iNdEx = postIndex 1249 case 3: 1250 if wireType != 2 { 1251 return fmt.Errorf("proto: wrong wireType = %d for field TimeoutInfo", wireType) 1252 } 1253 var msglen int 1254 for shift := uint(0); ; shift += 7 { 1255 if shift >= 64 { 1256 return ErrIntOverflowWal 1257 } 1258 if iNdEx >= l { 1259 return io.ErrUnexpectedEOF 1260 } 1261 b := dAtA[iNdEx] 1262 iNdEx++ 1263 msglen |= int(b&0x7F) << shift 1264 if b < 0x80 { 1265 break 1266 } 1267 } 1268 if msglen < 0 { 1269 return ErrInvalidLengthWal 1270 } 1271 postIndex := iNdEx + msglen 1272 if postIndex < 0 { 1273 return ErrInvalidLengthWal 1274 } 1275 if postIndex > l { 1276 return io.ErrUnexpectedEOF 1277 } 1278 v := &TimeoutInfo{} 1279 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1280 return err 1281 } 1282 m.Sum = &WALMessage_TimeoutInfo{v} 1283 iNdEx = postIndex 1284 case 4: 1285 if wireType != 2 { 1286 return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType) 1287 } 1288 var msglen int 1289 for shift := uint(0); ; shift += 7 { 1290 if shift >= 64 { 1291 return ErrIntOverflowWal 1292 } 1293 if iNdEx >= l { 1294 return io.ErrUnexpectedEOF 1295 } 1296 b := dAtA[iNdEx] 1297 iNdEx++ 1298 msglen |= int(b&0x7F) << shift 1299 if b < 0x80 { 1300 break 1301 } 1302 } 1303 if msglen < 0 { 1304 return ErrInvalidLengthWal 1305 } 1306 postIndex := iNdEx + msglen 1307 if postIndex < 0 { 1308 return ErrInvalidLengthWal 1309 } 1310 if postIndex > l { 1311 return io.ErrUnexpectedEOF 1312 } 1313 v := &EndHeight{} 1314 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1315 return err 1316 } 1317 m.Sum = &WALMessage_EndHeight{v} 1318 iNdEx = postIndex 1319 default: 1320 iNdEx = preIndex 1321 skippy, err := skipWal(dAtA[iNdEx:]) 1322 if err != nil { 1323 return err 1324 } 1325 if (skippy < 0) || (iNdEx+skippy) < 0 { 1326 return ErrInvalidLengthWal 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 (m *TimedWALMessage) Unmarshal(dAtA []byte) error { 1341 l := len(dAtA) 1342 iNdEx := 0 1343 for iNdEx < l { 1344 preIndex := iNdEx 1345 var wire uint64 1346 for shift := uint(0); ; shift += 7 { 1347 if shift >= 64 { 1348 return ErrIntOverflowWal 1349 } 1350 if iNdEx >= l { 1351 return io.ErrUnexpectedEOF 1352 } 1353 b := dAtA[iNdEx] 1354 iNdEx++ 1355 wire |= uint64(b&0x7F) << shift 1356 if b < 0x80 { 1357 break 1358 } 1359 } 1360 fieldNum := int32(wire >> 3) 1361 wireType := int(wire & 0x7) 1362 if wireType == 4 { 1363 return fmt.Errorf("proto: TimedWALMessage: wiretype end group for non-group") 1364 } 1365 if fieldNum <= 0 { 1366 return fmt.Errorf("proto: TimedWALMessage: illegal tag %d (wire type %d)", fieldNum, wire) 1367 } 1368 switch fieldNum { 1369 case 1: 1370 if wireType != 2 { 1371 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 1372 } 1373 var msglen int 1374 for shift := uint(0); ; shift += 7 { 1375 if shift >= 64 { 1376 return ErrIntOverflowWal 1377 } 1378 if iNdEx >= l { 1379 return io.ErrUnexpectedEOF 1380 } 1381 b := dAtA[iNdEx] 1382 iNdEx++ 1383 msglen |= int(b&0x7F) << shift 1384 if b < 0x80 { 1385 break 1386 } 1387 } 1388 if msglen < 0 { 1389 return ErrInvalidLengthWal 1390 } 1391 postIndex := iNdEx + msglen 1392 if postIndex < 0 { 1393 return ErrInvalidLengthWal 1394 } 1395 if postIndex > l { 1396 return io.ErrUnexpectedEOF 1397 } 1398 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil { 1399 return err 1400 } 1401 iNdEx = postIndex 1402 case 2: 1403 if wireType != 2 { 1404 return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) 1405 } 1406 var msglen int 1407 for shift := uint(0); ; shift += 7 { 1408 if shift >= 64 { 1409 return ErrIntOverflowWal 1410 } 1411 if iNdEx >= l { 1412 return io.ErrUnexpectedEOF 1413 } 1414 b := dAtA[iNdEx] 1415 iNdEx++ 1416 msglen |= int(b&0x7F) << shift 1417 if b < 0x80 { 1418 break 1419 } 1420 } 1421 if msglen < 0 { 1422 return ErrInvalidLengthWal 1423 } 1424 postIndex := iNdEx + msglen 1425 if postIndex < 0 { 1426 return ErrInvalidLengthWal 1427 } 1428 if postIndex > l { 1429 return io.ErrUnexpectedEOF 1430 } 1431 if m.Msg == nil { 1432 m.Msg = &WALMessage{} 1433 } 1434 if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1435 return err 1436 } 1437 iNdEx = postIndex 1438 default: 1439 iNdEx = preIndex 1440 skippy, err := skipWal(dAtA[iNdEx:]) 1441 if err != nil { 1442 return err 1443 } 1444 if (skippy < 0) || (iNdEx+skippy) < 0 { 1445 return ErrInvalidLengthWal 1446 } 1447 if (iNdEx + skippy) > l { 1448 return io.ErrUnexpectedEOF 1449 } 1450 iNdEx += skippy 1451 } 1452 } 1453 1454 if iNdEx > l { 1455 return io.ErrUnexpectedEOF 1456 } 1457 return nil 1458 } 1459 func skipWal(dAtA []byte) (n int, err error) { 1460 l := len(dAtA) 1461 iNdEx := 0 1462 depth := 0 1463 for iNdEx < l { 1464 var wire uint64 1465 for shift := uint(0); ; shift += 7 { 1466 if shift >= 64 { 1467 return 0, ErrIntOverflowWal 1468 } 1469 if iNdEx >= l { 1470 return 0, io.ErrUnexpectedEOF 1471 } 1472 b := dAtA[iNdEx] 1473 iNdEx++ 1474 wire |= (uint64(b) & 0x7F) << shift 1475 if b < 0x80 { 1476 break 1477 } 1478 } 1479 wireType := int(wire & 0x7) 1480 switch wireType { 1481 case 0: 1482 for shift := uint(0); ; shift += 7 { 1483 if shift >= 64 { 1484 return 0, ErrIntOverflowWal 1485 } 1486 if iNdEx >= l { 1487 return 0, io.ErrUnexpectedEOF 1488 } 1489 iNdEx++ 1490 if dAtA[iNdEx-1] < 0x80 { 1491 break 1492 } 1493 } 1494 case 1: 1495 iNdEx += 8 1496 case 2: 1497 var length int 1498 for shift := uint(0); ; shift += 7 { 1499 if shift >= 64 { 1500 return 0, ErrIntOverflowWal 1501 } 1502 if iNdEx >= l { 1503 return 0, io.ErrUnexpectedEOF 1504 } 1505 b := dAtA[iNdEx] 1506 iNdEx++ 1507 length |= (int(b) & 0x7F) << shift 1508 if b < 0x80 { 1509 break 1510 } 1511 } 1512 if length < 0 { 1513 return 0, ErrInvalidLengthWal 1514 } 1515 iNdEx += length 1516 case 3: 1517 depth++ 1518 case 4: 1519 if depth == 0 { 1520 return 0, ErrUnexpectedEndOfGroupWal 1521 } 1522 depth-- 1523 case 5: 1524 iNdEx += 4 1525 default: 1526 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1527 } 1528 if iNdEx < 0 { 1529 return 0, ErrInvalidLengthWal 1530 } 1531 if depth == 0 { 1532 return iNdEx, nil 1533 } 1534 } 1535 return 0, io.ErrUnexpectedEOF 1536 } 1537 1538 var ( 1539 ErrInvalidLengthWal = fmt.Errorf("proto: negative length found during unmarshaling") 1540 ErrIntOverflowWal = fmt.Errorf("proto: integer overflow") 1541 ErrUnexpectedEndOfGroupWal = fmt.Errorf("proto: unexpected end of group") 1542 )