github.com/lazyledger/lazyledger-core@v0.35.0-dev.0.20210613111200-4c651f053571/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/lazyledger/lazyledger-core/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  	// 550 bytes of a gzipped FileDescriptorProto
   376  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0x41, 0x6b, 0x13, 0x41,
   377  	0x14, 0xde, 0x69, 0xd2, 0xb4, 0x99, 0x28, 0xc2, 0x1a, 0x4a, 0x0c, 0x74, 0xb3, 0xa6, 0x08, 0xb9,
   378  	0xb8, 0x0b, 0x15, 0x41, 0xbc, 0x58, 0x43, 0x2a, 0x09, 0x58, 0x90, 0xb1, 0x20, 0x14, 0x61, 0xd9,
   379  	0x64, 0x5f, 0x26, 0x0b, 0xd9, 0x99, 0xb0, 0x33, 0xab, 0xd4, 0x8b, 0x7f, 0x21, 0x47, 0xff, 0x89,
   380  	0x7f, 0xa1, 0xc7, 0x1e, 0x3d, 0x55, 0x49, 0xfe, 0x88, 0xec, 0xcc, 0x24, 0x59, 0xec, 0x7a, 0x9b,
   381  	0x37, 0xef, 0x7b, 0xef, 0x7b, 0xef, 0xfb, 0x66, 0xb0, 0x23, 0x81, 0x45, 0x90, 0x26, 0x31, 0x93,
   382  	0xfe, 0x84, 0x33, 0x01, 0x4c, 0x64, 0xc2, 0xff, 0x1a, 0xce, 0xbd, 0x45, 0xca, 0x25, 0xb7, 0x9b,
   383  	0xbb, 0xbc, 0xb7, 0xcd, 0xb7, 0x9b, 0x94, 0x53, 0xae, 0x00, 0x7e, 0x7e, 0xd2, 0xd8, 0xb6, 0x5b,
   384  	0xda, 0x4b, 0x5e, 0x2f, 0x40, 0x18, 0xc4, 0x71, 0x01, 0xa1, 0xee, 0x7d, 0xf8, 0x02, 0x4c, 0x6e,
   385  	0xd2, 0x0e, 0xe5, 0x9c, 0xce, 0xc1, 0x57, 0xd1, 0x38, 0x9b, 0xfa, 0x51, 0x96, 0x86, 0x32, 0xe6,
   386  	0xcc, 0xe4, 0x3b, 0xff, 0xe6, 0x65, 0x9c, 0x80, 0x90, 0x61, 0xb2, 0xd0, 0x80, 0x2e, 0xe0, 0x83,
   387  	0x0b, 0x41, 0x47, 0x6c, 0xca, 0xed, 0x97, 0xb8, 0x92, 0x08, 0xda, 0x42, 0x2e, 0xea, 0x35, 0x4e,
   388  	0x8f, 0xbd, 0xb2, 0x35, 0xbc, 0x0b, 0x10, 0x22, 0xa4, 0xd0, 0xaf, 0xde, 0xdc, 0x75, 0x2c, 0x92,
   389  	0xe3, 0xed, 0x13, 0x7c, 0xb0, 0x00, 0x48, 0x83, 0x38, 0x6a, 0xed, 0xb9, 0xa8, 0x57, 0xef, 0xe3,
   390  	0xd5, 0x5d, 0xa7, 0xf6, 0x01, 0x20, 0x1d, 0x0d, 0x48, 0x2d, 0x4f, 0x8d, 0xa2, 0xee, 0x12, 0xe1,
   391  	0xc6, 0x65, 0x9c, 0x00, 0xcf, 0xa4, 0xe2, 0x7a, 0x83, 0x0f, 0x37, 0x93, 0x1a, 0xc2, 0x27, 0x9e,
   392  	0x1e, 0xd5, 0xdb, 0x8c, 0xea, 0x0d, 0x0c, 0xa0, 0x7f, 0x98, 0x93, 0xfd, 0xf8, 0xdd, 0x41, 0x64,
   393  	0x5b, 0x64, 0x1f, 0xe1, 0xda, 0x0c, 0x62, 0x3a, 0x93, 0x8a, 0xb4, 0x42, 0x4c, 0x64, 0x37, 0xf1,
   394  	0x7e, 0xca, 0x33, 0x16, 0xb5, 0x2a, 0x2e, 0xea, 0xed, 0x13, 0x1d, 0xd8, 0x36, 0xae, 0x0a, 0x09,
   395  	0x8b, 0x56, 0xd5, 0x45, 0xbd, 0x87, 0x44, 0x9d, 0xbb, 0x27, 0xb8, 0x7e, 0xce, 0xa2, 0xa1, 0x2e,
   396  	0xdb, 0xb5, 0x43, 0xc5, 0x76, 0xdd, 0x9f, 0x7b, 0x18, 0x7f, 0x7a, 0xfb, 0xde, 0xac, 0x6d, 0x7f,
   397  	0xc6, 0x47, 0x4a, 0xfe, 0x20, 0x0a, 0x65, 0x18, 0xa8, 0xde, 0x81, 0x90, 0xa1, 0x04, 0xb3, 0xc4,
   398  	0xb3, 0xa2, 0x6a, 0xda, 0xc6, 0xf3, 0x1c, 0x3f, 0x08, 0x65, 0x48, 0x72, 0xf4, 0xc7, 0x1c, 0x3c,
   399  	0xb4, 0xc8, 0x63, 0xb8, 0x7f, 0x6d, 0xbf, 0xc6, 0x87, 0x89, 0xa0, 0x41, 0xcc, 0xa6, 0x5c, 0x6d,
   400  	0xf5, 0x7f, 0x17, 0xb4, 0x63, 0x43, 0x8b, 0x1c, 0x24, 0xc6, 0xbc, 0x77, 0xf8, 0x81, 0xd4, 0xfa,
   401  	0xea, 0xfa, 0x8a, 0xaa, 0x7f, 0x5a, 0x5e, 0x5f, 0x70, 0x62, 0x68, 0x91, 0x86, 0x2c, 0x18, 0x73,
   402  	0x86, 0x31, 0xb0, 0x28, 0x30, 0x62, 0x54, 0x55, 0x97, 0x4e, 0x79, 0x97, 0xad, 0x7a, 0x43, 0x8b,
   403  	0xd4, 0x61, 0x13, 0xf4, 0xf7, 0x71, 0x45, 0x64, 0x49, 0xf7, 0x3b, 0x7e, 0x94, 0xd3, 0x44, 0x05,
   404  	0xf5, 0x5e, 0xe1, 0x6a, 0x4e, 0x65, 0xb4, 0x6a, 0xdf, 0x33, 0xfc, 0x72, 0xf3, 0x36, 0xb5, 0xe3,
   405  	0xcb, 0xdc, 0x71, 0x55, 0x61, 0x9f, 0xea, 0xa7, 0xa9, 0x45, 0x71, 0xcb, 0xc7, 0xd9, 0x11, 0xa9,
   406  	0x77, 0xd9, 0xbf, 0xba, 0x59, 0x39, 0xe8, 0x76, 0xe5, 0xa0, 0x3f, 0x2b, 0x07, 0x2d, 0xd7, 0x8e,
   407  	0x75, 0xbb, 0x76, 0xac, 0x5f, 0x6b, 0xc7, 0xba, 0x3a, 0xa3, 0xb1, 0x9c, 0x65, 0x63, 0x6f, 0xc2,
   408  	0x13, 0x7f, 0x1e, 0x7e, 0xbb, 0x9e, 0x43, 0x44, 0x21, 0x2d, 0x1c, 0x9f, 0x4f, 0x78, 0x6a, 0xfe,
   409  	0x8c, 0x5f, 0xf6, 0x43, 0xc7, 0x35, 0x95, 0x7b, 0xf1, 0x37, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x59,
   410  	0x98, 0x1a, 0x0c, 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 {
   926  				return ErrInvalidLengthWal
   927  			}
   928  			if (iNdEx + skippy) < 0 {
   929  				return ErrInvalidLengthWal
   930  			}
   931  			if (iNdEx + skippy) > l {
   932  				return io.ErrUnexpectedEOF
   933  			}
   934  			iNdEx += skippy
   935  		}
   936  	}
   937  
   938  	if iNdEx > l {
   939  		return io.ErrUnexpectedEOF
   940  	}
   941  	return nil
   942  }
   943  func (m *TimeoutInfo) Unmarshal(dAtA []byte) error {
   944  	l := len(dAtA)
   945  	iNdEx := 0
   946  	for iNdEx < l {
   947  		preIndex := iNdEx
   948  		var wire uint64
   949  		for shift := uint(0); ; shift += 7 {
   950  			if shift >= 64 {
   951  				return ErrIntOverflowWal
   952  			}
   953  			if iNdEx >= l {
   954  				return io.ErrUnexpectedEOF
   955  			}
   956  			b := dAtA[iNdEx]
   957  			iNdEx++
   958  			wire |= uint64(b&0x7F) << shift
   959  			if b < 0x80 {
   960  				break
   961  			}
   962  		}
   963  		fieldNum := int32(wire >> 3)
   964  		wireType := int(wire & 0x7)
   965  		if wireType == 4 {
   966  			return fmt.Errorf("proto: TimeoutInfo: wiretype end group for non-group")
   967  		}
   968  		if fieldNum <= 0 {
   969  			return fmt.Errorf("proto: TimeoutInfo: illegal tag %d (wire type %d)", fieldNum, wire)
   970  		}
   971  		switch fieldNum {
   972  		case 1:
   973  			if wireType != 2 {
   974  				return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType)
   975  			}
   976  			var msglen int
   977  			for shift := uint(0); ; shift += 7 {
   978  				if shift >= 64 {
   979  					return ErrIntOverflowWal
   980  				}
   981  				if iNdEx >= l {
   982  					return io.ErrUnexpectedEOF
   983  				}
   984  				b := dAtA[iNdEx]
   985  				iNdEx++
   986  				msglen |= int(b&0x7F) << shift
   987  				if b < 0x80 {
   988  					break
   989  				}
   990  			}
   991  			if msglen < 0 {
   992  				return ErrInvalidLengthWal
   993  			}
   994  			postIndex := iNdEx + msglen
   995  			if postIndex < 0 {
   996  				return ErrInvalidLengthWal
   997  			}
   998  			if postIndex > l {
   999  				return io.ErrUnexpectedEOF
  1000  			}
  1001  			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.Duration, dAtA[iNdEx:postIndex]); err != nil {
  1002  				return err
  1003  			}
  1004  			iNdEx = postIndex
  1005  		case 2:
  1006  			if wireType != 0 {
  1007  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1008  			}
  1009  			m.Height = 0
  1010  			for shift := uint(0); ; shift += 7 {
  1011  				if shift >= 64 {
  1012  					return ErrIntOverflowWal
  1013  				}
  1014  				if iNdEx >= l {
  1015  					return io.ErrUnexpectedEOF
  1016  				}
  1017  				b := dAtA[iNdEx]
  1018  				iNdEx++
  1019  				m.Height |= int64(b&0x7F) << shift
  1020  				if b < 0x80 {
  1021  					break
  1022  				}
  1023  			}
  1024  		case 3:
  1025  			if wireType != 0 {
  1026  				return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType)
  1027  			}
  1028  			m.Round = 0
  1029  			for shift := uint(0); ; shift += 7 {
  1030  				if shift >= 64 {
  1031  					return ErrIntOverflowWal
  1032  				}
  1033  				if iNdEx >= l {
  1034  					return io.ErrUnexpectedEOF
  1035  				}
  1036  				b := dAtA[iNdEx]
  1037  				iNdEx++
  1038  				m.Round |= int32(b&0x7F) << shift
  1039  				if b < 0x80 {
  1040  					break
  1041  				}
  1042  			}
  1043  		case 4:
  1044  			if wireType != 0 {
  1045  				return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType)
  1046  			}
  1047  			m.Step = 0
  1048  			for shift := uint(0); ; shift += 7 {
  1049  				if shift >= 64 {
  1050  					return ErrIntOverflowWal
  1051  				}
  1052  				if iNdEx >= l {
  1053  					return io.ErrUnexpectedEOF
  1054  				}
  1055  				b := dAtA[iNdEx]
  1056  				iNdEx++
  1057  				m.Step |= uint32(b&0x7F) << shift
  1058  				if b < 0x80 {
  1059  					break
  1060  				}
  1061  			}
  1062  		default:
  1063  			iNdEx = preIndex
  1064  			skippy, err := skipWal(dAtA[iNdEx:])
  1065  			if err != nil {
  1066  				return err
  1067  			}
  1068  			if skippy < 0 {
  1069  				return ErrInvalidLengthWal
  1070  			}
  1071  			if (iNdEx + skippy) < 0 {
  1072  				return ErrInvalidLengthWal
  1073  			}
  1074  			if (iNdEx + skippy) > l {
  1075  				return io.ErrUnexpectedEOF
  1076  			}
  1077  			iNdEx += skippy
  1078  		}
  1079  	}
  1080  
  1081  	if iNdEx > l {
  1082  		return io.ErrUnexpectedEOF
  1083  	}
  1084  	return nil
  1085  }
  1086  func (m *EndHeight) Unmarshal(dAtA []byte) error {
  1087  	l := len(dAtA)
  1088  	iNdEx := 0
  1089  	for iNdEx < l {
  1090  		preIndex := iNdEx
  1091  		var wire uint64
  1092  		for shift := uint(0); ; shift += 7 {
  1093  			if shift >= 64 {
  1094  				return ErrIntOverflowWal
  1095  			}
  1096  			if iNdEx >= l {
  1097  				return io.ErrUnexpectedEOF
  1098  			}
  1099  			b := dAtA[iNdEx]
  1100  			iNdEx++
  1101  			wire |= uint64(b&0x7F) << shift
  1102  			if b < 0x80 {
  1103  				break
  1104  			}
  1105  		}
  1106  		fieldNum := int32(wire >> 3)
  1107  		wireType := int(wire & 0x7)
  1108  		if wireType == 4 {
  1109  			return fmt.Errorf("proto: EndHeight: wiretype end group for non-group")
  1110  		}
  1111  		if fieldNum <= 0 {
  1112  			return fmt.Errorf("proto: EndHeight: illegal tag %d (wire type %d)", fieldNum, wire)
  1113  		}
  1114  		switch fieldNum {
  1115  		case 1:
  1116  			if wireType != 0 {
  1117  				return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType)
  1118  			}
  1119  			m.Height = 0
  1120  			for shift := uint(0); ; shift += 7 {
  1121  				if shift >= 64 {
  1122  					return ErrIntOverflowWal
  1123  				}
  1124  				if iNdEx >= l {
  1125  					return io.ErrUnexpectedEOF
  1126  				}
  1127  				b := dAtA[iNdEx]
  1128  				iNdEx++
  1129  				m.Height |= int64(b&0x7F) << shift
  1130  				if b < 0x80 {
  1131  					break
  1132  				}
  1133  			}
  1134  		default:
  1135  			iNdEx = preIndex
  1136  			skippy, err := skipWal(dAtA[iNdEx:])
  1137  			if err != nil {
  1138  				return err
  1139  			}
  1140  			if skippy < 0 {
  1141  				return ErrInvalidLengthWal
  1142  			}
  1143  			if (iNdEx + skippy) < 0 {
  1144  				return ErrInvalidLengthWal
  1145  			}
  1146  			if (iNdEx + skippy) > l {
  1147  				return io.ErrUnexpectedEOF
  1148  			}
  1149  			iNdEx += skippy
  1150  		}
  1151  	}
  1152  
  1153  	if iNdEx > l {
  1154  		return io.ErrUnexpectedEOF
  1155  	}
  1156  	return nil
  1157  }
  1158  func (m *WALMessage) Unmarshal(dAtA []byte) error {
  1159  	l := len(dAtA)
  1160  	iNdEx := 0
  1161  	for iNdEx < l {
  1162  		preIndex := iNdEx
  1163  		var wire uint64
  1164  		for shift := uint(0); ; shift += 7 {
  1165  			if shift >= 64 {
  1166  				return ErrIntOverflowWal
  1167  			}
  1168  			if iNdEx >= l {
  1169  				return io.ErrUnexpectedEOF
  1170  			}
  1171  			b := dAtA[iNdEx]
  1172  			iNdEx++
  1173  			wire |= uint64(b&0x7F) << shift
  1174  			if b < 0x80 {
  1175  				break
  1176  			}
  1177  		}
  1178  		fieldNum := int32(wire >> 3)
  1179  		wireType := int(wire & 0x7)
  1180  		if wireType == 4 {
  1181  			return fmt.Errorf("proto: WALMessage: wiretype end group for non-group")
  1182  		}
  1183  		if fieldNum <= 0 {
  1184  			return fmt.Errorf("proto: WALMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  1185  		}
  1186  		switch fieldNum {
  1187  		case 1:
  1188  			if wireType != 2 {
  1189  				return fmt.Errorf("proto: wrong wireType = %d for field EventDataRoundState", wireType)
  1190  			}
  1191  			var msglen int
  1192  			for shift := uint(0); ; shift += 7 {
  1193  				if shift >= 64 {
  1194  					return ErrIntOverflowWal
  1195  				}
  1196  				if iNdEx >= l {
  1197  					return io.ErrUnexpectedEOF
  1198  				}
  1199  				b := dAtA[iNdEx]
  1200  				iNdEx++
  1201  				msglen |= int(b&0x7F) << shift
  1202  				if b < 0x80 {
  1203  					break
  1204  				}
  1205  			}
  1206  			if msglen < 0 {
  1207  				return ErrInvalidLengthWal
  1208  			}
  1209  			postIndex := iNdEx + msglen
  1210  			if postIndex < 0 {
  1211  				return ErrInvalidLengthWal
  1212  			}
  1213  			if postIndex > l {
  1214  				return io.ErrUnexpectedEOF
  1215  			}
  1216  			v := &types.EventDataRoundState{}
  1217  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1218  				return err
  1219  			}
  1220  			m.Sum = &WALMessage_EventDataRoundState{v}
  1221  			iNdEx = postIndex
  1222  		case 2:
  1223  			if wireType != 2 {
  1224  				return fmt.Errorf("proto: wrong wireType = %d for field MsgInfo", wireType)
  1225  			}
  1226  			var msglen int
  1227  			for shift := uint(0); ; shift += 7 {
  1228  				if shift >= 64 {
  1229  					return ErrIntOverflowWal
  1230  				}
  1231  				if iNdEx >= l {
  1232  					return io.ErrUnexpectedEOF
  1233  				}
  1234  				b := dAtA[iNdEx]
  1235  				iNdEx++
  1236  				msglen |= int(b&0x7F) << shift
  1237  				if b < 0x80 {
  1238  					break
  1239  				}
  1240  			}
  1241  			if msglen < 0 {
  1242  				return ErrInvalidLengthWal
  1243  			}
  1244  			postIndex := iNdEx + msglen
  1245  			if postIndex < 0 {
  1246  				return ErrInvalidLengthWal
  1247  			}
  1248  			if postIndex > l {
  1249  				return io.ErrUnexpectedEOF
  1250  			}
  1251  			v := &MsgInfo{}
  1252  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1253  				return err
  1254  			}
  1255  			m.Sum = &WALMessage_MsgInfo{v}
  1256  			iNdEx = postIndex
  1257  		case 3:
  1258  			if wireType != 2 {
  1259  				return fmt.Errorf("proto: wrong wireType = %d for field TimeoutInfo", wireType)
  1260  			}
  1261  			var msglen int
  1262  			for shift := uint(0); ; shift += 7 {
  1263  				if shift >= 64 {
  1264  					return ErrIntOverflowWal
  1265  				}
  1266  				if iNdEx >= l {
  1267  					return io.ErrUnexpectedEOF
  1268  				}
  1269  				b := dAtA[iNdEx]
  1270  				iNdEx++
  1271  				msglen |= int(b&0x7F) << shift
  1272  				if b < 0x80 {
  1273  					break
  1274  				}
  1275  			}
  1276  			if msglen < 0 {
  1277  				return ErrInvalidLengthWal
  1278  			}
  1279  			postIndex := iNdEx + msglen
  1280  			if postIndex < 0 {
  1281  				return ErrInvalidLengthWal
  1282  			}
  1283  			if postIndex > l {
  1284  				return io.ErrUnexpectedEOF
  1285  			}
  1286  			v := &TimeoutInfo{}
  1287  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1288  				return err
  1289  			}
  1290  			m.Sum = &WALMessage_TimeoutInfo{v}
  1291  			iNdEx = postIndex
  1292  		case 4:
  1293  			if wireType != 2 {
  1294  				return fmt.Errorf("proto: wrong wireType = %d for field EndHeight", wireType)
  1295  			}
  1296  			var msglen int
  1297  			for shift := uint(0); ; shift += 7 {
  1298  				if shift >= 64 {
  1299  					return ErrIntOverflowWal
  1300  				}
  1301  				if iNdEx >= l {
  1302  					return io.ErrUnexpectedEOF
  1303  				}
  1304  				b := dAtA[iNdEx]
  1305  				iNdEx++
  1306  				msglen |= int(b&0x7F) << shift
  1307  				if b < 0x80 {
  1308  					break
  1309  				}
  1310  			}
  1311  			if msglen < 0 {
  1312  				return ErrInvalidLengthWal
  1313  			}
  1314  			postIndex := iNdEx + msglen
  1315  			if postIndex < 0 {
  1316  				return ErrInvalidLengthWal
  1317  			}
  1318  			if postIndex > l {
  1319  				return io.ErrUnexpectedEOF
  1320  			}
  1321  			v := &EndHeight{}
  1322  			if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1323  				return err
  1324  			}
  1325  			m.Sum = &WALMessage_EndHeight{v}
  1326  			iNdEx = postIndex
  1327  		default:
  1328  			iNdEx = preIndex
  1329  			skippy, err := skipWal(dAtA[iNdEx:])
  1330  			if err != nil {
  1331  				return err
  1332  			}
  1333  			if skippy < 0 {
  1334  				return ErrInvalidLengthWal
  1335  			}
  1336  			if (iNdEx + skippy) < 0 {
  1337  				return ErrInvalidLengthWal
  1338  			}
  1339  			if (iNdEx + skippy) > l {
  1340  				return io.ErrUnexpectedEOF
  1341  			}
  1342  			iNdEx += skippy
  1343  		}
  1344  	}
  1345  
  1346  	if iNdEx > l {
  1347  		return io.ErrUnexpectedEOF
  1348  	}
  1349  	return nil
  1350  }
  1351  func (m *TimedWALMessage) Unmarshal(dAtA []byte) error {
  1352  	l := len(dAtA)
  1353  	iNdEx := 0
  1354  	for iNdEx < l {
  1355  		preIndex := iNdEx
  1356  		var wire uint64
  1357  		for shift := uint(0); ; shift += 7 {
  1358  			if shift >= 64 {
  1359  				return ErrIntOverflowWal
  1360  			}
  1361  			if iNdEx >= l {
  1362  				return io.ErrUnexpectedEOF
  1363  			}
  1364  			b := dAtA[iNdEx]
  1365  			iNdEx++
  1366  			wire |= uint64(b&0x7F) << shift
  1367  			if b < 0x80 {
  1368  				break
  1369  			}
  1370  		}
  1371  		fieldNum := int32(wire >> 3)
  1372  		wireType := int(wire & 0x7)
  1373  		if wireType == 4 {
  1374  			return fmt.Errorf("proto: TimedWALMessage: wiretype end group for non-group")
  1375  		}
  1376  		if fieldNum <= 0 {
  1377  			return fmt.Errorf("proto: TimedWALMessage: illegal tag %d (wire type %d)", fieldNum, wire)
  1378  		}
  1379  		switch fieldNum {
  1380  		case 1:
  1381  			if wireType != 2 {
  1382  				return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType)
  1383  			}
  1384  			var msglen int
  1385  			for shift := uint(0); ; shift += 7 {
  1386  				if shift >= 64 {
  1387  					return ErrIntOverflowWal
  1388  				}
  1389  				if iNdEx >= l {
  1390  					return io.ErrUnexpectedEOF
  1391  				}
  1392  				b := dAtA[iNdEx]
  1393  				iNdEx++
  1394  				msglen |= int(b&0x7F) << shift
  1395  				if b < 0x80 {
  1396  					break
  1397  				}
  1398  			}
  1399  			if msglen < 0 {
  1400  				return ErrInvalidLengthWal
  1401  			}
  1402  			postIndex := iNdEx + msglen
  1403  			if postIndex < 0 {
  1404  				return ErrInvalidLengthWal
  1405  			}
  1406  			if postIndex > l {
  1407  				return io.ErrUnexpectedEOF
  1408  			}
  1409  			if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Time, dAtA[iNdEx:postIndex]); err != nil {
  1410  				return err
  1411  			}
  1412  			iNdEx = postIndex
  1413  		case 2:
  1414  			if wireType != 2 {
  1415  				return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
  1416  			}
  1417  			var msglen int
  1418  			for shift := uint(0); ; shift += 7 {
  1419  				if shift >= 64 {
  1420  					return ErrIntOverflowWal
  1421  				}
  1422  				if iNdEx >= l {
  1423  					return io.ErrUnexpectedEOF
  1424  				}
  1425  				b := dAtA[iNdEx]
  1426  				iNdEx++
  1427  				msglen |= int(b&0x7F) << shift
  1428  				if b < 0x80 {
  1429  					break
  1430  				}
  1431  			}
  1432  			if msglen < 0 {
  1433  				return ErrInvalidLengthWal
  1434  			}
  1435  			postIndex := iNdEx + msglen
  1436  			if postIndex < 0 {
  1437  				return ErrInvalidLengthWal
  1438  			}
  1439  			if postIndex > l {
  1440  				return io.ErrUnexpectedEOF
  1441  			}
  1442  			if m.Msg == nil {
  1443  				m.Msg = &WALMessage{}
  1444  			}
  1445  			if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1446  				return err
  1447  			}
  1448  			iNdEx = postIndex
  1449  		default:
  1450  			iNdEx = preIndex
  1451  			skippy, err := skipWal(dAtA[iNdEx:])
  1452  			if err != nil {
  1453  				return err
  1454  			}
  1455  			if skippy < 0 {
  1456  				return ErrInvalidLengthWal
  1457  			}
  1458  			if (iNdEx + skippy) < 0 {
  1459  				return ErrInvalidLengthWal
  1460  			}
  1461  			if (iNdEx + skippy) > l {
  1462  				return io.ErrUnexpectedEOF
  1463  			}
  1464  			iNdEx += skippy
  1465  		}
  1466  	}
  1467  
  1468  	if iNdEx > l {
  1469  		return io.ErrUnexpectedEOF
  1470  	}
  1471  	return nil
  1472  }
  1473  func skipWal(dAtA []byte) (n int, err error) {
  1474  	l := len(dAtA)
  1475  	iNdEx := 0
  1476  	depth := 0
  1477  	for iNdEx < l {
  1478  		var wire uint64
  1479  		for shift := uint(0); ; shift += 7 {
  1480  			if shift >= 64 {
  1481  				return 0, ErrIntOverflowWal
  1482  			}
  1483  			if iNdEx >= l {
  1484  				return 0, io.ErrUnexpectedEOF
  1485  			}
  1486  			b := dAtA[iNdEx]
  1487  			iNdEx++
  1488  			wire |= (uint64(b) & 0x7F) << shift
  1489  			if b < 0x80 {
  1490  				break
  1491  			}
  1492  		}
  1493  		wireType := int(wire & 0x7)
  1494  		switch wireType {
  1495  		case 0:
  1496  			for shift := uint(0); ; shift += 7 {
  1497  				if shift >= 64 {
  1498  					return 0, ErrIntOverflowWal
  1499  				}
  1500  				if iNdEx >= l {
  1501  					return 0, io.ErrUnexpectedEOF
  1502  				}
  1503  				iNdEx++
  1504  				if dAtA[iNdEx-1] < 0x80 {
  1505  					break
  1506  				}
  1507  			}
  1508  		case 1:
  1509  			iNdEx += 8
  1510  		case 2:
  1511  			var length int
  1512  			for shift := uint(0); ; shift += 7 {
  1513  				if shift >= 64 {
  1514  					return 0, ErrIntOverflowWal
  1515  				}
  1516  				if iNdEx >= l {
  1517  					return 0, io.ErrUnexpectedEOF
  1518  				}
  1519  				b := dAtA[iNdEx]
  1520  				iNdEx++
  1521  				length |= (int(b) & 0x7F) << shift
  1522  				if b < 0x80 {
  1523  					break
  1524  				}
  1525  			}
  1526  			if length < 0 {
  1527  				return 0, ErrInvalidLengthWal
  1528  			}
  1529  			iNdEx += length
  1530  		case 3:
  1531  			depth++
  1532  		case 4:
  1533  			if depth == 0 {
  1534  				return 0, ErrUnexpectedEndOfGroupWal
  1535  			}
  1536  			depth--
  1537  		case 5:
  1538  			iNdEx += 4
  1539  		default:
  1540  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1541  		}
  1542  		if iNdEx < 0 {
  1543  			return 0, ErrInvalidLengthWal
  1544  		}
  1545  		if depth == 0 {
  1546  			return iNdEx, nil
  1547  		}
  1548  	}
  1549  	return 0, io.ErrUnexpectedEOF
  1550  }
  1551  
  1552  var (
  1553  	ErrInvalidLengthWal        = fmt.Errorf("proto: negative length found during unmarshaling")
  1554  	ErrIntOverflowWal          = fmt.Errorf("proto: integer overflow")
  1555  	ErrUnexpectedEndOfGroupWal = fmt.Errorf("proto: unexpected end of group")
  1556  )