Exemplo n.º 1
0
bool TransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
{
    CPubKey rPubKey;
    if(!rPubKey.RecoverCompact(sighash,vchSig))
        return false;
    if(rPubKey == pubkey)
        return true;
    if(!rPubKey.Compress())
        return false;
    return rPubKey == pubkey;
}