Merge pull request #7303 from ziggie1984/fuzz_tests_custommessages
Add Custom Message to Fuzz Testing
This commit is contained in:
2 files changed
+19
No files matched your search
@@ -225,6 +225,9 @@ data.
|
|||||||
* [Decreased the mutex lock
|
* [Decreased the mutex lock
|
||||||
scope](https://github.com/lightningnetwork/lnd/pull/7330) inside `ChannelRouter`.
|
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`
|
## `lncli`
|
||||||
|
|
||||||
* [Add an `insecure` flag to skip tls auth as well as a `metadata` string slice
|
* [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
|
* Tommy Volk
|
||||||
* Yong Yu
|
* Yong Yu
|
||||||
* Yusuke Shimizu
|
* Yusuke Shimizu
|
||||||
|
* ziggie1984
|
||||||
@@ -807,3 +807,18 @@ func FuzzUpdateFulfillHTLC(f *testing.F) {
|
|||||||
harness(t, data)
|
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)
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in new issue
Block a user