@@ -65,36 +65,78 @@ type MsgRequestNext struct {
6565}
6666
6767func NewMsgRequestNext () * MsgRequestNext {
68- r := & MsgRequestNext {
68+ m := & MsgRequestNext {
6969 MessageBase : protocol.MessageBase {
7070 MessageType : MESSAGE_TYPE_REQUEST_NEXT ,
7171 },
7272 }
73- return r
73+ return m
7474}
7575
7676type MsgAwaitReply struct {
7777 protocol.MessageBase
7878}
7979
80+ func NewMsgAwaitReply () * MsgAwaitReply {
81+ m := & MsgAwaitReply {
82+ MessageBase : protocol.MessageBase {
83+ MessageType : MESSAGE_TYPE_AWAIT_REPLY ,
84+ },
85+ }
86+ return m
87+ }
88+
8089type MsgRollForwardNtC struct {
8190 protocol.MessageBase
8291 WrappedData []byte
8392 Tip Tip
8493}
8594
95+ func NewMsgRollForwardNtC (wrappedData []byte , tip Tip ) * MsgRollForwardNtC {
96+ m := & MsgRollForwardNtC {
97+ MessageBase : protocol.MessageBase {
98+ MessageType : MESSAGE_TYPE_ROLL_FORWARD ,
99+ },
100+ WrappedData : wrappedData ,
101+ Tip : tip ,
102+ }
103+ return m
104+ }
105+
86106type MsgRollForwardNtN struct {
87107 protocol.MessageBase
88108 WrappedHeader WrappedHeader
89109 Tip Tip
90110}
91111
112+ func NewMsgRollForwardNtN (wrappedHeader WrappedHeader , tip Tip ) * MsgRollForwardNtN {
113+ m := & MsgRollForwardNtN {
114+ MessageBase : protocol.MessageBase {
115+ MessageType : MESSAGE_TYPE_ROLL_FORWARD ,
116+ },
117+ WrappedHeader : wrappedHeader ,
118+ Tip : tip ,
119+ }
120+ return m
121+ }
122+
92123type MsgRollBackward struct {
93124 protocol.MessageBase
94125 Point Point
95126 Tip Tip
96127}
97128
129+ func NewMsgRollBackward (point Point , tip Tip ) * MsgRollBackward {
130+ m := & MsgRollBackward {
131+ MessageBase : protocol.MessageBase {
132+ MessageType : MESSAGE_TYPE_ROLL_BACKWARD ,
133+ },
134+ Point : point ,
135+ Tip : tip ,
136+ }
137+ return m
138+ }
139+
98140type MsgFindIntersect struct {
99141 protocol.MessageBase
100142 Points []interface {}
@@ -116,15 +158,45 @@ type MsgIntersectFound struct {
116158 Tip Tip
117159}
118160
161+ func NewMsgIntersectFound (point Point , tip Tip ) * MsgIntersectFound {
162+ m := & MsgIntersectFound {
163+ MessageBase : protocol.MessageBase {
164+ MessageType : MESSAGE_TYPE_INTERSECT_FOUND ,
165+ },
166+ Point : point ,
167+ Tip : tip ,
168+ }
169+ return m
170+ }
171+
119172type MsgIntersectNotFound struct {
120173 protocol.MessageBase
121174 Tip Tip
122175}
123176
177+ func NewMsgIntersectNotFound (tip Tip ) * MsgIntersectNotFound {
178+ m := & MsgIntersectNotFound {
179+ MessageBase : protocol.MessageBase {
180+ MessageType : MESSAGE_TYPE_INTERSECT_NOT_FOUND ,
181+ },
182+ Tip : tip ,
183+ }
184+ return m
185+ }
186+
124187type MsgDone struct {
125188 protocol.MessageBase
126189}
127190
191+ func NewMsgDone () * MsgDone {
192+ m := & MsgDone {
193+ MessageBase : protocol.MessageBase {
194+ MessageType : MESSAGE_TYPE_DONE ,
195+ },
196+ }
197+ return m
198+ }
199+
128200type Tip struct {
129201 // Tells the CBOR decoder to convert to/from a struct and a CBOR array
130202 _ struct {} `cbor:",toarray"`
0 commit comments