X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fscript.cpp;h=bd1b5b3c5f4782e820b9f62c878cca5a4cca5c6a;hb=98705aa51cbfee81ecd2498a014c285ac677ba69;hp=e1b5ae8959e1be5a3a3bdee59d2eebea44c8a50c;hpb=04e442070d3db1abb761d3e04d80d6ece6d5602b;p=novacoin.git diff --git a/src/script.cpp b/src/script.cpp index e1b5ae8..bd1b5b3 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1038,12 +1038,13 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash { // Sign const valtype& vchPubKey = item.second; - if (!keystore.HaveKey(vchPubKey)) + CPrivKey privkey; + if (!keystore.GetPrivKey(vchPubKey, privkey)) return false; if (hash != 0) { vector vchSig; - if (!CKey::Sign(keystore.GetPrivKey(vchPubKey), hash, vchSig)) + if (!CKey::Sign(privkey, hash, vchSig)) return false; vchSig.push_back((unsigned char)nHashType); scriptSigRet << vchSig; @@ -1056,12 +1057,13 @@ bool Solver(const CKeyStore& keystore, const CScript& scriptPubKey, uint256 hash if (mi == mapPubKeys.end()) return false; const vector& vchPubKey = (*mi).second; - if (!keystore.HaveKey(vchPubKey)) + CPrivKey privkey; + if (!keystore.GetPrivKey(vchPubKey, privkey)) return false; if (hash != 0) { vector vchSig; - if (!CKey::Sign(keystore.GetPrivKey(vchPubKey), hash, vchSig)) + if (!CKey::Sign(privkey, hash, vchSig)) return false; vchSig.push_back((unsigned char)nHashType); scriptSigRet << vchSig << vchPubKey;