shardeum / shardus-core

Other
10 stars 2 forks source link

RED-220: always emit `node-deactivated` event #229

Closed PudgyPug closed 1 month ago

github-actions[bot] commented 1 month ago

PR Reviewer Guide 🔍

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Key issues to review

Code Duplication
The `emitParams` object is created twice with the same properties in different branches of conditional logic. Consider refactoring to create this object once and use it in both places to reduce redundancy and potential errors in future modifications.