Restore zcash coinbase rule and launch fix at 10080

This commit is contained in:
Michael Toutonghi
2018-05-25 15:10:07 -07:00
parent a65fe46f84
commit 6c8e1cdfb7
5 changed files with 38 additions and 7 deletions

View File

@@ -440,6 +440,23 @@ public:
class CCoinsViewCache : public CCoinsViewBacked
{
protected:
class CLaunchMap
{
public:
unordered_map<uint256, CScript> launchMap;
CLaunchMap() { }
CLaunchMap(uint256 *whiteList, uint160 pkh, int count)
{
launchMap = unordered_map<uint256, CScript &>();
for (int i = 0; i < count; i++)
{
launchMap[whiteList[i]] = CScript();
launchMap[whiteList[i]] << OP_DUP << OP_HASH160 << pkh << OP_EQUALVERIFY << OP_CHECKSIG;
}
}
};
static CLaunchMap launchMap();
/* Whether this cache has an active modifier. */
bool hasModifier;
@@ -457,6 +474,8 @@ protected:
/* Cached dynamic memory usage for the inner CCoins objects. */
mutable size_t cachedCoinsUsage;
const CScript &GetSpendFor(const CCoins *coins, const CTxIn& input) const;
public:
CCoinsViewCache(CCoinsView *baseIn);
~CCoinsViewCache();
@@ -535,7 +554,6 @@ public:
const CTxOut &GetOutputFor(const CTxIn& input) const;
const CScript &GetSpendFor(const CTxIn& input) const;
friend class CCoinsModifier;
private: