Expose fedpeg fetching to consensus and mempool internals

This commit is contained in:
Gregory Sanders 2019-05-31 13:43:14 -04:00
parent b00515e223
commit 0cfe03bec4
10 changed files with 76 additions and 50 deletions

View file

@ -603,7 +603,8 @@ static void CheckInputsAndUpdateCoins(const CTxMemPoolEntry& entry, CCoinsViewCa
CValidationState state;
CAmountMap fee_map;
std::set<std::pair<uint256, COutPoint> > setPeginsSpent;
bool fCheckResult = tx.IsCoinBase() || Consensus::CheckTxInputs(tx, state, mempoolDuplicate, spendheight, fee_map, setPeginsSpent, NULL, false, true);
std::vector<CScript> fedpegscripts = GetValidFedpegScripts(chainActive.Tip(), Params().GetConsensus(), true /* nextblock_validation */);
bool fCheckResult = tx.IsCoinBase() || Consensus::CheckTxInputs(tx, state, mempoolDuplicate, spendheight, fee_map, setPeginsSpent, NULL, false, true, fedpegscripts);
assert(fCheckResult);
UpdateCoins(tx, mempoolDuplicate, 1000000);