mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
Merge pull request #7303 from ziggie1984/fuzz_tests_custommessages
Add Custom Message to Fuzz Testing
This commit is contained in:
commit
3a6aaf6275
2 changed files with 19 additions and 0 deletions
|
@ -225,6 +225,9 @@ data.
|
|||
* [Decreased the mutex lock
|
||||
scope](https://github.com/lightningnetwork/lnd/pull/7330) inside `ChannelRouter`.
|
||||
|
||||
* [Add Custom Message to the fuzz testsuite
|
||||
in the lnwire package](https://github.com/lightningnetwork/lnd/pull/7303)
|
||||
|
||||
## `lncli`
|
||||
|
||||
* [Add an `insecure` flag to skip tls auth as well as a `metadata` string slice
|
||||
|
@ -411,3 +414,4 @@ refactor the itest for code health and maintenance.
|
|||
* Tommy Volk
|
||||
* Yong Yu
|
||||
* Yusuke Shimizu
|
||||
* ziggie1984
|
||||
|
|
|
@ -807,3 +807,18 @@ func FuzzUpdateFulfillHTLC(f *testing.F) {
|
|||
harness(t, data)
|
||||
})
|
||||
}
|
||||
|
||||
func FuzzCustomMessage(f *testing.F) {
|
||||
f.Fuzz(func(t *testing.T, data []byte, customMessageType uint16) {
|
||||
if customMessageType < uint16(CustomTypeStart) {
|
||||
customMessageType += uint16(CustomTypeStart)
|
||||
}
|
||||
|
||||
// Prefix with CustomMessage.
|
||||
data = prefixWithMsgType(data, MessageType(customMessageType))
|
||||
|
||||
// Pass the message into our general fuzz harness for wire
|
||||
// messages!
|
||||
harness(t, data)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue