mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
Resize after succesful result
This commit is contained in:
parent
9d8604f36a
commit
4cdaa95a20
@ -83,10 +83,11 @@ bool CKey::Sign(const uint256 &hash, std::vector<unsigned char>& vchSig, uint32_
|
|||||||
nonce += test_case;
|
nonce += test_case;
|
||||||
int nSigLen = 72;
|
int nSigLen = 72;
|
||||||
int ret = secp256k1_ecdsa_sign((const unsigned char*)&hash, 32, (unsigned char*)&vchSig[0], &nSigLen, begin(), (unsigned char*)&nonce);
|
int ret = secp256k1_ecdsa_sign((const unsigned char*)&hash, 32, (unsigned char*)&vchSig[0], &nSigLen, begin(), (unsigned char*)&nonce);
|
||||||
vchSig.resize(nSigLen);
|
|
||||||
nonce = 0;
|
nonce = 0;
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
vchSig.resize(nSigLen);
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
} while(true);
|
} while(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user