lnwire: add update_fail_malformed_htlc message

In this commit BOLT#4 specification message have been added to the
lnwire package. This messsage is needed in order to notify payment
sender that forwarding node unable to parse the onion blob.
This commit is contained in:
Andrey Samokhvalov authored and Olaoluwa Osuntokun committed 2017-07-14 19:08:04 -07:00
1 parent 98956bc2fe
commit 46ba18db9b
4 files changed
+94 -1

No files matched your search

+5
View File
@@ -39,6 +39,7 @@ const (
MsgUpdateFailHTLC = 131
MsgCommitSig = 132
MsgRevokeAndAck = 133
MsgUpdateFailMalformedHTLC = 135
MsgUpdateFee = 137
MsgChannelAnnouncement = 256
MsgNodeAnnouncement = 257
@@ -75,6 +76,8 @@ func (t MessageType) String() string {
return "CommitSig"
case MsgRevokeAndAck:
return "RevokeAndAck"
case MsgUpdateFailMalformedHTLC:
return "UpdateFailMalformedHTLC"
case MsgError:
return "Error"
case MsgChannelAnnouncement:
@@ -161,6 +164,8 @@ func makeEmptyMessage(msgType MessageType) (Message, error) {
msg = &RevokeAndAck{}
case MsgUpdateFee:
msg = &UpdateFee{}
case MsgUpdateFailMalformedHTLC:
msg = &UpdateFailMalformedHTLC{}
case MsgError:
msg = &Error{}
case MsgChannelAnnouncement: