github.com/decred/dcrlnd@v0.7.6/fuzz/wtwire/init.go (about) 1 //go:build gofuzz 2 // +build gofuzz 3 4 package wtwirefuzz 5 6 import ( 7 "github.com/decred/dcrlnd/watchtower/wtwire" 8 ) 9 10 // Fuzz_init is used by go-fuzz. 11 func Fuzz_init(data []byte) int { 12 // Prefix with MsgInit. 13 data = prefixWithMsgType(data, wtwire.MsgInit) 14 15 // Create an empty message so that the FuzzHarness func can check if the 16 // max payload constraint is violated. 17 emptyMsg := wtwire.Init{} 18 19 // Pass the message into our general fuzz harness for wire messages! 20 return harness(data, &emptyMsg) 21 }