Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).

This commit is contained in:
Gavin Andresen
2012-01-04 21:40:52 -05:00
parent d11a58a2d3
commit 922e8e2929
21 changed files with 824 additions and 544 deletions

View File

@@ -42,13 +42,13 @@ bool CWallet::AddCryptedKey(const vector<unsigned char> &vchPubKey, const vector
return false;
}
bool CWallet::AddCScript(const uint160 &hash, const CScript& redeemScript)
bool CWallet::AddCScript(const CScript& redeemScript)
{
if (!CCryptoKeyStore::AddCScript(hash, redeemScript))
if (!CCryptoKeyStore::AddCScript(redeemScript))
return false;
if (!fFileBacked)
return true;
return CWalletDB(strWalletFile).WriteCScript(hash, redeemScript);
return CWalletDB(strWalletFile).WriteCScript(Hash160(redeemScript), redeemScript);
}
bool CWallet::Unlock(const SecureString& strWalletPassphrase)