shardeum / shardus-core

Other
10 stars 2 forks source link

RED-196 check trie hashes for near node down check #236

Open magonjr opened 1 month ago

github-actions[bot] commented 1 month ago

PR Reviewer Guide ๐Ÿ”

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

Complexity and Error Handling
The new implementation in `isDownCheck` function is significantly complex and introduces multiple nested conditions and loops. This could lead to maintenance challenges and potential bugs. Additionally, the error handling for null checks and exceptions could be improved to prevent runtime errors. Possible Bug
The variable `nearNodeAsk` is used to make a request using `nearNode`, but in the subsequent request for `targetNodeAsk`, `nearNode` is used instead of `node`. This seems like a potential bug where the wrong node might be queried.