lnwire_test: include onion message in lnwire Benchmark#10634
lnwire_test: include onion message in lnwire Benchmark#10634Abdulkbk wants to merge 2 commits intolightningnetwork:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request adds the OnionMessage to the lnwire benchmark suite. To support this and fix existing benchmark failures, it also introduces a new test helper createValidTLVExtraData to generate valid TLV data for message ExtraData fields, replacing the previous method that produced malformed data. The changes look good and address the stated goals. I have a couple of suggestions to improve the new test helpers.
b83e7d1 to
d9ce5ff
Compare
d9ce5ff to
e27efc4
Compare
|
@gijswijs when you have time take a look, it's a small diff 🙏 |
gijswijs
left a comment
There was a problem hiding this comment.
Only one comment from me.
lnwire/message_test.go
Outdated
| records := make([]tlv.Record, 0, numRecords) | ||
| tlvType := tlv.Type(r.Intn(100) + 1) | ||
|
|
||
| for i := 0; i < numRecords; i++ { |
There was a problem hiding this comment.
Use for i := range numRecords
That's what we prefer.
In this commit, we include onion message to the list of lnwire messages for benchmark testing.
e27efc4 to
d648db7
Compare
In this commit, we added createValidTLVExtraData which creates a valid TLV data, and use it in place of createExtraData for messages that their Encode or Decode requires validating the TLV data, which were failing initially.
d648db7 to
12be098
Compare
|
@Abdulkbk, remember to re-request review from reviewers when ready |
Change Description
In this PR, we include the
OnionMessagemessage, introduced in #9868, in the existing Benchmark pipeline for lnwire messages.We also fix some failing benchmarks caused by a malformed extraData TLV.
Steps to Test