aboutsummaryrefslogtreecommitdiff
path: root/src/db.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2011-12-20 14:43:31 -0500
committerGavin Andresen <gavinandresen@gmail.com>2011-12-20 14:43:31 -0500
commit595925592d36fb5d5d34beea3c3e71fca2b6726e (patch)
treee28c34353aa08a6f3c0368a39982970c08245ea3 /src/db.h
parentf06e3e0ea6c8da90585a9f0936c390659dcece37 (diff)
parent77f21f1583deb89bf3fffe80fe9b181fedb1dd60 (diff)
Merge branch 'op_eval'
Diffstat (limited to 'src/db.h')
-rw-r--r--src/db.h27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/db.h b/src/db.h
index 15bfb29c8e..e593ae28ed 100644
--- a/src/db.h
+++ b/src/db.h
@@ -13,17 +13,17 @@
#include <db_cxx.h>
-class CTxIndex;
+class CAccount;
+class CAccountingEntry;
+class CAddress;
+class CBlockLocator;
class CDiskBlockIndex;
class CDiskTxPos;
+class CMasterKey;
class COutPoint;
-class CAddress;
-class CWalletTx;
+class CTxIndex;
class CWallet;
-class CAccount;
-class CAccountingEntry;
-class CBlockLocator;
-
+class CWalletTx;
extern unsigned int nWalletDBUpdated;
extern DbEnv dbenv;
@@ -420,6 +420,19 @@ public:
return Write(std::make_pair(std::string("mkey"), nID), kMasterKey, true);
}
+ // Support for BIP 0013 : see https://en.bitcoin.it/wiki/BIP_0013
+ bool ReadCScript(const uint160 &hash, CScript& redeemScript)
+ {
+ redeemScript.clear();
+ return Read(std::make_pair(std::string("cscript"), hash), redeemScript);
+ }
+
+ bool WriteCScript(const uint160& hash, const CScript& redeemScript)
+ {
+ nWalletDBUpdated++;
+ return Write(std::make_pair(std::string("cscript"), hash), redeemScript, false);
+ }
+
bool WriteBestBlock(const CBlockLocator& locator)
{
nWalletDBUpdated++;