aboutsummaryrefslogtreecommitdiff
path: root/src/db.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/db.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/db.h')
-rw-r--r--src/db.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/db.h b/src/db.h
index 15bfb29c8e..99dd88b491 100644
--- a/src/db.h
+++ b/src/db.h
@@ -420,6 +420,18 @@ public:
return Write(std::make_pair(std::string("mkey"), nID), kMasterKey, true);
}
+ bool ReadCScript(const uint160 &hash, std::vector<unsigned char>& data)
+ {
+ data.clear();
+ return Read(std::make_pair(std::string("cscript"), hash), data);
+ }
+
+ bool WriteCScript(const uint160& hash, const std::vector<unsigned char>& data)
+ {
+ nWalletDBUpdated++;
+ return Write(std::make_pair(std::string("cscript"), hash), data, false);
+ }
+
bool WriteBestBlock(const CBlockLocator& locator)
{
nWalletDBUpdated++;