Adds size and type checks during coin deserialization that fail on known bad data.
Closes #1373.
Code changes brief
Certain aspects of coin data must be checked during deserialization. These include the validity of the coin type (mint or spend) and the size of encrypted recipient data. This PR adds these checks directly into deserializers, and will throw errors on bad data.
PR intention
Adds size and type checks during coin deserialization that fail on known bad data.
Closes #1373.
Code changes brief
Certain aspects of coin data must be checked during deserialization. These include the validity of the coin type (mint or spend) and the size of encrypted recipient data. This PR adds these checks directly into deserializers, and will throw errors on bad data.