You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1556 lines
37 KiB

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