diff options
| author | Gavin Andresen <[email protected]> | 2012-01-04 21:40:52 -0500 |
|---|---|---|
| committer | Gavin Andresen <[email protected]> | 2012-01-13 10:22:23 -0500 |
| commit | 922e8e2929a2e78270868385aa46f96002fbcff3 (patch) | |
| tree | d7c7d2b3fe89bc18b8d0f1137980b9db16db3ae8 /src/wallet.cpp | |
| parent | Remove not-used-anywhere scriptPrereq from SignSignature() (diff) | |
| download | discoin-922e8e2929a2e78270868385aa46f96002fbcff3.tar.xz discoin-922e8e2929a2e78270868385aa46f96002fbcff3.zip | |
Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).
Diffstat (limited to 'src/wallet.cpp')
| -rw-r--r-- | src/wallet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 28d15ef2e..a196044f1 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -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) |