aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-10-03 13:05:43 -0400
committerGavin Andresen <gavinandresen@gmail.com>2011-12-19 12:40:19 -0500
commite679ec969c8b22c676ebb10bea1038f6c8f13b33 (patch)
treec584f1a152c376ca0df93261d447c5b719449508 /src/wallet.h
parentcc40ba2151a627b6da9af4932e0bee58e69aacb5 (diff)
OP_EVAL implementation
OP_EVAL is a new opcode that evaluates an item on the stack as a script. It enables a new type of bitcoin address that needs an arbitrarily complex script to redeem.
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/wallet.h b/src/wallet.h
index 78f055a604..34090ec803 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -69,6 +69,8 @@ public:
bool AddCryptedKey(const std::vector<unsigned char> &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret);
// Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
bool LoadCryptedKey(const std::vector<unsigned char> &vchPubKey, const std::vector<unsigned char> &vchCryptedSecret) { return CCryptoKeyStore::AddCryptedKey(vchPubKey, vchCryptedSecret); }
+ bool AddCScript(const uint160& hash, const std::vector<unsigned char>& data);
+ bool LoadCScript(const uint160& hash, const std::vector<unsigned char>& data) { return CCryptoKeyStore::AddCScript(hash, data); }
bool Unlock(const SecureString& strWalletPassphrase);
bool ChangeWalletPassphrase(const SecureString& strOldWalletPassphrase, const SecureString& strNewWalletPassphrase);
@@ -114,15 +116,7 @@ public:
throw std::runtime_error("CWallet::GetCredit() : value out of range");
return (IsMine(txout) ? txout.nValue : 0);
}
- bool IsChange(const CTxOut& txout) const
- {
- CBitcoinAddress address;
- if (ExtractAddress(txout.scriptPubKey, this, address))
- CRITICAL_BLOCK(cs_wallet)
- if (!mapAddressBook.count(address))
- return true;
- return false;
- }
+ bool IsChange(const CTxOut& txout) const;
int64 GetChange(const CTxOut& txout) const
{
if (!MoneyRange(txout.nValue))