From f0f99d7e360b457c275a9457003a21060bb7bcf9 Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Fri, 11 Nov 2022 11:45:30 -0600 Subject: [PATCH] lnwire: add fuzz test for Warning --- lnwire/fuzz_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lnwire/fuzz_test.go b/lnwire/fuzz_test.go index ed7088280..4ec35e6dd 100644 --- a/lnwire/fuzz_test.go +++ b/lnwire/fuzz_test.go @@ -264,6 +264,17 @@ func FuzzError(f *testing.F) { }) } +func FuzzWarning(f *testing.F) { + f.Fuzz(func(t *testing.T, data []byte) { + // Prefix with MsgWarning. + data = prefixWithMsgType(data, MsgWarning) + + // Pass the message into our general fuzz harness for wire + // messages! + harness(t, data) + }) +} + func FuzzFundingCreated(f *testing.F) { f.Fuzz(func(t *testing.T, data []byte) { // Prefix with MsgFundingCreated.