shardeum / shardus-core

Other
10 stars 2 forks source link

SYS-380: Implement `verifyNodeUnknown` test #248

Open muni-corn opened 3 weeks ago

muni-corn commented 3 weeks ago

Depends on https://github.com/shardeum/shardus-core/pull/244 . Will keep as a draft until https://github.com/shardeum/shardus-core/pull/244 is merged.

github-actions[bot] commented 3 weeks ago

PR Reviewer Guide ๐Ÿ”

โฑ๏ธ Estimated effort to review: 4 ๐Ÿ”ต๐Ÿ”ต๐Ÿ”ต๐Ÿ”ตโšช
๐Ÿงช PR contains tests
๐Ÿ”’ No security concerns identified
โšก Key issues to review

Code Duplication
There is significant code duplication in the logging and event counting sections. Consider creating helper functions to handle these repetitive tasks to improve code maintainability. Error Handling
The error handling for join request processing is verbose and could be streamlined. Consider refactoring to reduce complexity and improve readability. Logging Consistency
The logging statements are inconsistent and use different methods for similar events. Standardizing logging could improve the traceability and debugging process. Complex Validation Logic
The validation logic in `validate.ts` is complex and hard to follow. Consider breaking down into smaller, more manageable functions and possibly using a strategy pattern for different types of validations.