mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-29 02:02:46 +02:00
Added Error message type to wire protocol
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
f3849f5c10
commit
b4c644c99a
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user