|
|
|
@ -246,7 +246,7 @@ bool CKey::SignCompact(const uint256 &hash, std::vector<unsigned char>& vchSig)
|
|
|
|
|
secp256k1_ecdsa_recoverable_signature sig;
|
|
|
|
|
int ret = secp256k1_ecdsa_sign_recoverable(secp256k1_context_sign, &sig, hash.begin(), begin(), secp256k1_nonce_function_rfc6979, nullptr);
|
|
|
|
|
assert(ret);
|
|
|
|
|
secp256k1_ecdsa_recoverable_signature_serialize_compact(secp256k1_context_sign, &vchSig[1], &rec, &sig);
|
|
|
|
|
ret = secp256k1_ecdsa_recoverable_signature_serialize_compact(secp256k1_context_sign, &vchSig[1], &rec, &sig);
|
|
|
|
|
assert(ret);
|
|
|
|
|
assert(rec != -1);
|
|
|
|
|
vchSig[0] = 27 + rec + (fCompressed ? 4 : 0);
|
|
|
|
|