lnwire: update tests and message code definitions for new gossip query msgs

This commit is contained in:
Olaoluwa Osuntokun committed 2018-05-31 16:30:52 -07:00
1 parent fa9a012ac6
commit 62df3cbbb8
3 files changed
+123 -1

No files matched your search

+25
View File
@@ -49,6 +49,11 @@ const (
MsgNodeAnnouncement = 257
MsgChannelUpdate = 258
MsgAnnounceSignatures = 259
MsgQueryShortChanIDs = 261
MsgReplyShortChanIDsEnd = 262
MsgQueryChannelRange = 263
MsgReplyChannelRange = 264
MsgGossipTimestampRange = 265
)
// String return the string representation of message type.
@@ -100,6 +105,16 @@ func (t MessageType) String() string {
return "Pong"
case MsgUpdateFee:
return "UpdateFee"
case MsgQueryShortChanIDs:
return "QueryShortChanIDs"
case MsgReplyShortChanIDsEnd:
return "ReplyShortChanIDsEnd"
case MsgQueryChannelRange:
return "QueryChannelRange"
case MsgReplyChannelRange:
return "ReplyChannelRange"
case MsgGossipTimestampRange:
return "GossipTimestampRange"
default:
return "<unknown>"
}
@@ -191,6 +206,16 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
msg = &AnnounceSignatures{}
case MsgPong:
msg = &Pong{}
case MsgQueryShortChanIDs:
msg = &QueryShortChanIDs{}
case MsgReplyShortChanIDsEnd:
msg = &ReplyShortChanIDsEnd{}
case MsgQueryChannelRange:
msg = &QueryChannelRange{}
case MsgReplyChannelRange:
msg = &ReplyChannelRange{}
case MsgGossipTimestampRange:
msg = &GossipTimestampRange{}
default:
return nil, &UnknownMessage{msgType}
}