Consensus: Refactor: Separate Consensus::CheckTxInputs and GetSpendHeight in CheckInputs

This commit is contained in:
Jorge Timón
2015-04-24 16:45:16 +02:00
parent b6ea3bcede
commit eb837199a0
2 changed files with 28 additions and 9 deletions

View File

@@ -507,4 +507,11 @@ extern CCoinsViewCache *pcoinsTip;
/** Global variable that points to the active block tree (protected by cs_main) */
extern CBlockTreeDB *pblocktree;
/**
* Return the spend height, which is one more than the inputs.GetBestBlock().
* While checking, GetBestBlock() refers to the parent block. (protected by cs_main)
* This is also true for mempool checks.
*/
int GetSpendHeight(const CCoinsViewCache& inputs);
#endif // BITCOIN_MAIN_H