lnwire/onion_error: add InvalidOnionPayload failure

This commit is contained in:
Conner Fromknecht committed 2019-10-30 21:19:36 -07:00
1 parent 3c91c3a8ff
commit 0fc506e044
2 files changed
+71

No files matched your search

+3
View File
@@ -16,6 +16,8 @@ var (
testAmount = MilliSatoshi(1)
testCtlvExpiry = uint32(2)
testFlags = uint16(2)
testType = uint64(3)
testOffset = uint16(24)
sig, _ = NewSigFromSignature(testSig)
testChannelUpdate = ChannelUpdate{
Signature: sig,
@@ -50,6 +52,7 @@ var onionFailures = []FailureMessage{
NewChannelDisabled(testFlags, testChannelUpdate),
NewFinalIncorrectCltvExpiry(testCtlvExpiry),
NewFinalIncorrectHtlcAmount(testAmount),
NewInvalidOnionPayload(testType, testOffset),
}
// TestEncodeDecodeCode tests the ability of onion errors to be properly encoded