From e679ec969c8b22c676ebb10bea1038f6c8f13b33 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Mon, 3 Oct 2011 13:05:43 -0400 Subject: 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. --- src/db.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/db.h') 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& data) + { + data.clear(); + return Read(std::make_pair(std::string("cscript"), hash), data); + } + + bool WriteCScript(const uint160& hash, const std::vector& data) + { + nWalletDBUpdated++; + return Write(std::make_pair(std::string("cscript"), hash), data, false); + } + bool WriteBestBlock(const CBlockLocator& locator) { nWalletDBUpdated++; -- cgit v1.2.3