Skip to content

Commit 5953eaa

Browse files
committed
lnwire: add fuzz tests for ClosingComplete+ClosingSigs
1 parent 3d88017 commit 5953eaa

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lnwire/fuzz_test.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,3 +878,25 @@ func FuzzInvalidOnionPayload(f *testing.F) {
878878
onionFailureHarness(t, data, CodeInvalidOnionPayload)
879879
})
880880
}
881+
882+
func FuzzClosingSig(f *testing.F) {
883+
f.Fuzz(func(t *testing.T, data []byte) {
884+
// Prefix with ClosingSig.
885+
data = prefixWithMsgType(data, MsgClosingSig)
886+
887+
// Pass the message into our general fuzz harness for wire
888+
// messages!
889+
harness(t, data)
890+
})
891+
}
892+
893+
func FuzzClosingComplete(f *testing.F) {
894+
f.Fuzz(func(t *testing.T, data []byte) {
895+
// Prefix with ClosingComplete.
896+
data = prefixWithMsgType(data, MsgClosingComplete)
897+
898+
// Pass the message into our general fuzz harness for wire
899+
// messages!
900+
harness(t, data)
901+
})
902+
}

0 commit comments

Comments
 (0)