fix: Reset all collections before reading in CDeterministicMNListDiff::Unserialize()#6814
Conversation
…f::Unserialize()`
|
WalkthroughA single change in src/evo/deterministicmns.h modifies CDeterministicMNListDiff::Unserialize(Stream& s) to explicitly clear addedMNs before reading, with a comment indicating resetting all collections prior to deserialization. This aligns addedMNs with existing resets for updatedMNs and removedMns. The rest of the deserialization logic (reading addedMNs, updatedMNs, removedMns from the stream) remains unchanged. No exported/public signatures were altered. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
src/{masternode,evo}/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| void Unserialize(Stream& s) | ||
| { | ||
| // Reset all collections before reading | ||
| addedMNs.clear(); |
There was a problem hiding this comment.
nit: Could be in a Clear() function like CDeterministicMNList (source) but non-blocker
Issue being fixed or feature implemented
Fix the issue found by @coderabbitai while reviewing #6813 #6813 (review)
What was done?
How Has This Been Tested?
Breaking Changes
n/a
Checklist: