lnwire: prep wire messages for TLV extensions
Messages: - UpdateFulfillHTLC - UpdateFee - UpdateFailMalformedHTLC - UpdateFailHTLC - UpdateAddHTLC - Shutdown - RevokeAndAck - ReplyShortChanIDsEnd - ReplyChannelRange - QueryShortChanIDs - QueryChannelRange - NodeAnnouncement - Init - GossipTimestampRange - FundingSigned - FundingLocked - FundingCreated - CommitSig - ClosingSigned - ChannelUpdate - ChannelReestablish - ChannelAnnouncement - AnnounceSignatures lnwire: update quickcheck tests, use constant for Error multi: update unit tests to pass deep equal assertions with messages In this commit, we update a series of unit tests in the code base to now pass due to the new wire message encode/decode logic. In many instances, we'll now manually set the extra bytes to an empty byte slice to avoid comparisons that fail due to one message having an empty byte slice and the other having a nil pointer.
This commit is contained in:
1 parent
a603ac4938
commit
9a6bb19770
32 files changed
+278
-231
No files matched your search
@@ -39,18 +39,21 @@ func TestNetworkResultSerialization(t *testing.T) {
|
||||
ChanID: chanID,
|
||||
ID: 2,
|
||||
PaymentPreimage: preimage,
|
||||
ExtraData: make([]byte, 0),
|
||||
}
|
||||
|
||||
fail := &lnwire.UpdateFailHTLC{
|
||||
ChanID: chanID,
|
||||
ID: 1,
|
||||
Reason: []byte{},
|
||||
ChanID: chanID,
|
||||
ID: 1,
|
||||
Reason: []byte{},
|
||||
ExtraData: make([]byte, 0),
|
||||
}
|
||||
|
||||
fail2 := &lnwire.UpdateFailHTLC{
|
||||
ChanID: chanID,
|
||||
ID: 1,
|
||||
Reason: reason[:],
|
||||
ChanID: chanID,
|
||||
ID: 1,
|
||||
Reason: reason[:],
|
||||
ExtraData: make([]byte, 0),
|
||||
}
|
||||
|
||||
testCases := []*networkResult{
|
||||
|
||||
Reference in new issue
Block a user