bitcoin/bitcoin — pull request #786 by sipa (2012-01-26 18:29:30+00:00)
Title: Full checking of all loaded keys

See #782: @piratelinux is right in saying that not everything is checked, as GetPubKey() returns the public key embedded in the PrivKey structure, and does not force recalculation.

CKey::IsValid() performs this check now.