mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 15:21:39 +02:00
VersionedSlate and VersionedBinSlate are untagged and try V5 first, so without a version check a V4 slate parses as V5. Only visible without a payment proof; with one the V4 and V5 proof shapes differ enough for serde to pick the right variant by chance. Reject a mismatched version in the V4 and V5 deserializers, for both the JSON and binary encodings, and set the declared version from the conversion so it always matches the structure emitted. Add V4/V5 round trip tests over both encodings, with and without a proof. The V3 API examples showed V4 slates declaring version 5; they now declare 4.