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.
This commit is contained in:
Gavin Andresen
2011-10-03 13:05:43 -04:00
parent cc40ba2151
commit e679ec969c
15 changed files with 1165 additions and 582 deletions

View File

@@ -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++;