lnwire: add fuzz test for Warning

This commit is contained in:
Matt Morehouse 2022-11-11 11:45:30 -06:00
parent 258cf6466d
commit f0f99d7e36
No known key found for this signature in database
GPG key ID: CC8ECA224831C982

View file

@ -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.