From 88a8c6618de93b5a71aa27846decbe9d7fea406b Mon Sep 17 00:00:00 2001 From: ziggie Date: Sun, 8 Jan 2023 00:07:35 +0100 Subject: [PATCH 1/2] lnwire: add custom message to fuzz tests --- lnwire/fuzz_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lnwire/fuzz_test.go b/lnwire/fuzz_test.go index 4ec35e6dd..34d144c84 100644 --- a/lnwire/fuzz_test.go +++ b/lnwire/fuzz_test.go @@ -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) + }) +} From 4e3dc95d84406e6a16d3a852bd9df9d2b322850d Mon Sep 17 00:00:00 2001 From: ziggie Date: Sun, 8 Jan 2023 00:17:32 +0100 Subject: [PATCH 2/2] docs: add 0.16.0 release notes --- docs/release-notes/release-notes-0.16.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-notes/release-notes-0.16.0.md b/docs/release-notes/release-notes-0.16.0.md index ed27b2ebd..4504089bc 100644 --- a/docs/release-notes/release-notes-0.16.0.md +++ b/docs/release-notes/release-notes-0.16.0.md @@ -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