|
|
@ -1038,13 +1038,13 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Sign
|
|
|
|
// Sign
|
|
|
|
const valtype& vchPubKey = item.second; |
|
|
|
const valtype& vchPubKey = item.second; |
|
|
|
CPrivKey privkey; |
|
|
|
CKey key; |
|
|
|
if (!keystore.GetPrivKey(vchPubKey, privkey)) |
|
|
|
if (!keystore.GetPrivKey(vchPubKey, key)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
if (hash != 0) |
|
|
|
if (hash != 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
vector<unsigned char> vchSig; |
|
|
|
vector<unsigned char> vchSig; |
|
|
|
if (!CKey::Sign(privkey, hash, vchSig)) |
|
|
|
if (!key.Sign(hash, vchSig)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
vchSig.push_back((unsigned char)nHashType); |
|
|
|
vchSig.push_back((unsigned char)nHashType); |
|
|
|
scriptSigRet << vchSig; |
|
|
|
scriptSigRet << vchSig; |
|
|
@ -1057,13 +1057,13 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash |
|
|
|
if (mi == mapPubKeys.end()) |
|
|
|
if (mi == mapPubKeys.end()) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
const vector<unsigned char>& vchPubKey = (*mi).second; |
|
|
|
const vector<unsigned char>& vchPubKey = (*mi).second; |
|
|
|
CPrivKey privkey; |
|
|
|
CKey key; |
|
|
|
if (!keystore.GetPrivKey(vchPubKey, privkey)) |
|
|
|
if (!keystore.GetPrivKey(vchPubKey, key)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
if (hash != 0) |
|
|
|
if (hash != 0) |
|
|
|
{ |
|
|
|
{ |
|
|
|
vector<unsigned char> vchSig; |
|
|
|
vector<unsigned char> vchSig; |
|
|
|
if (!CKey::Sign(privkey, hash, vchSig)) |
|
|
|
if (!key.Sign(hash, vchSig)) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
vchSig.push_back((unsigned char)nHashType); |
|
|
|
vchSig.push_back((unsigned char)nHashType); |
|
|
|
scriptSigRet << vchSig << vchPubKey; |
|
|
|
scriptSigRet << vchSig << vchPubKey; |
|
|
|