github.com/decred/dcrlnd@v0.7.6/fuzz/wtwire/state_update_reply.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_state_update_reply is used by go-fuzz.
    11  func Fuzz_state_update_reply(data []byte) int {
    12  	// Prefix with MsgStateUpdateReply.
    13  	data = prefixWithMsgType(data, wtwire.MsgStateUpdateReply)
    14  
    15  	// Create an empty message so that the FuzzHarness func can check if the
    16  	// max payload constraint is violated.
    17  	emptyMsg := wtwire.StateUpdateReply{}
    18  
    19  	// Pass the message into our general fuzz harness for wire messages!
    20  	return harness(data, &emptyMsg)
    21  }