-
Notifications
You must be signed in to change notification settings - Fork 3
Add ENR test #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ENR test #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive unit tests for ENR (Ethereum Node Record) encoding and decoding functionality and improves the robustness of ENR decoding by handling unknown key/value pairs gracefully instead of asserting.
- Added a complete test suite with round-trip tests, deterministic encoding verification, and real ENR string decoding
- Modified ENR decoder to skip unknown keys with warning logs instead of crashing
- Integrated the new test suite into the CMake build system
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/unit/serde/enr_test.cpp | New comprehensive test suite for ENR encoding/decoding with three test cases |
| tests/unit/serde/CMakeLists.txt | New CMake configuration for the ENR test suite |
| tests/unit/CMakeLists.txt | Added serde subdirectory to unit test build |
| src/serde/enr.cpp | Enhanced ENR decoder to handle unknown keys gracefully with warning logs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: turuslan <[email protected]>
Signed-off-by: turuslan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
enr_testundertests/unit/serdewith comprehensive unit tests for ENR encoding and decoding, including round-trip tests, deterministic encoding checks, and decoding of a real ENR string.enr.cppto skip unknown key/value pairs instead of asserting, and added a warning log for each unknown key encountered during decoding.