lnwire: on Message interface convert Command to MsgType

This commit modifies the Message interface to convert the Command
method to a MsgType method that uses a new set of message type for all
the defined messages. These new messages types nearly exactly match the
message types used within the current draft of the BOLT specifications.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-04-19 15:57:50 -07:00
1 parent bcd142bc30
commit f6b3c25f95
21 files changed
+119 -151

No files matched your search

+3 -3
View File
@@ -120,12 +120,12 @@ func (c *UpdateFailHTLC) Encode(w io.Writer, pver uint32) error {
)
}
// Command returns the integer uniquely identifying this message type on the
// MsgType returns the integer uniquely identifying this message type on the
// wire.
//
// This is part of the lnwire.Message interface.
func (c *UpdateFailHTLC) Command() uint32 {
return CmdUpdateFailHTLC
func (c *UpdateFailHTLC) MsgType() MessageType {
return MsgUpdateFailHTLC
}
// MaxPayloadLength returns the maximum allowed payload size for a UpdateFailHTLC