lnwire: create distinct type for UpdateFailHTLC failure reason
This commit creates a distint type for the opaque failure reason within the UpdateFailHTLC message. This new type is needed as this is the only variable length byte slice within the protocol and therefore requires a length prefix in order to serialize/deserialize properly.
This commit is contained in:
3 files changed
+32
-18
No files matched your search
@@ -12,7 +12,7 @@ func TestUpdateFailHTLC(t *testing.T) {
|
||||
ChannelPoint: *outpoint1,
|
||||
ID: 22,
|
||||
}
|
||||
copy(cancelMsg.Reason[:], bytes.Repeat([]byte{21}, 20))
|
||||
cancelMsg.Reason = []byte{byte(UnknownDestination)}
|
||||
|
||||
// Next encode the UFH message into an empty bytes buffer.
|
||||
var b bytes.Buffer
|
||||
|
||||
Reference in new issue
Block a user