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