fix: handle missing fields in ProUpServTx v2 encode#417
fix: handle missing fields in ProUpServTx v2 encode#417xdustinface wants to merge 1 commit intov0.42-devfrom
ProUpServTx v2 encode#417Conversation
The encoder was missing `mn_type` and `platform` fields that the decoder reads for version 2 payloads. This caused blocks containing v2 `ProUpServTx` transactions to be stored with fewer bytes than the decoder expected, leading to failure in deserialization. Fixes issues like: ``` Failed to create disk storage manager: Read failed: Failed to decode item: unknown special transaction type: 18546 ```
📝 WalkthroughWalkthroughProviderUpdateServicePayload serialization and deserialization logic is extended to support BasicBLS (v2+) protocol, adding conditional encoding/decoding of mn_type and Evo platform fields (platform_node_id, platform_p2p_port, platform_http_port) based on version and masternode type. Tests are updated with round-trip validation for v2 scenarios. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
The encoder was missing
mn_typeandplatformfields that the decoder reads for version 2 payloads. This caused blocks containing v2ProUpServTxtransactions to be stored with fewer bytes than the decoder expected, leading to failure in deserialization.Fixes issues like:
Summary by CodeRabbit
New Features
Tests