Added Error message type to wire protocol

This commit is contained in:
Joseph Poon authored and Olaoluwa Osuntokun committed 2016-01-14 23:56:10 -08:00
1 parent f3849f5c10
commit b4c644c99a
5 files changed
+144 -6

No files matched your search

+5
View File
@@ -57,6 +57,9 @@ const (
//Commitments
CmdCommitSignature = uint32(2000)
CmdCommitRevocation = uint32(2010)
//Error
CmdErrorGeneric = uint32(4000)
)
//Every message has these functions:
@@ -103,6 +106,8 @@ func makeEmptyMessage(command uint32) (Message, error) {
msg = &CommitSignature{}
case CmdCommitRevocation:
msg = &CommitRevocation{}
case CmdErrorGeneric:
msg = &ErrorGeneric{}
default:
return nil, fmt.Errorf("unhandled command [%d]", command)
}