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
2017-04-19 15:57:43 -07:00
parent bcd142bc30
commit f6b3c25f95
21 changed files with 119 additions and 151 deletions

View File

@@ -60,12 +60,12 @@ func (c *CommitSig) 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 *CommitSig) Command() uint32 {
return CmdCommitSig
func (c *CommitSig) MsgType() MessageType {
return MsgCommitSig
}
// MaxPayloadLength returns the maximum allowed payload size for a