When fuzzing the serialization code for CPubKey I noticed that Deserialize<CPubKey>(Serialize(obj)) == obj does not hold true for all CPubKey obj.
Is there any reason to why CPubKey is deviating from the other serializable classes (for which equality is defined) in this regard? :)
Context:
template <typename T>
CDataStream Serialize(const T& obj)
{
CDataStream ds(SER_NETWORK, INIT_PROTO_VERSION);
ds << obj;
return ds;
}
template <typename T>
T Deserialize(CDataStream ds)
{
T obj;
ds >> obj;
return obj;
}