src/key.h: 207 friend bool operator==(const CKey &a, const CKey &b) { 208 return a.fCompressed == b.fCompressed && memcmp(&a.vch[0], &b.vch[0], 32); 209 }
should compare return value from memcmp with zero.
what's more, to be accurate , this function should return true only when both keys are valid.