[qa] Add GetTransactionSigOpCost unit tests

This commit is contained in:
Jonas Nick
2016-05-28 19:22:13 +02:00
committed by Pieter Wuille
parent d846e02372
commit fdb43df23e
2 changed files with 185 additions and 0 deletions

View File

@@ -333,6 +333,14 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx);
*/
unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& mapInputs);
/**
* Compute total signature operation cost of a transaction.
* @param[in] tx Transaction for which we are computing the cost
* @param[in] inputs Map of previous transactions that have outputs we're spending
* @param[out] flags Script verification flags
* @return Total signature operation cost of tx
*/
int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& inputs, int flags);
/**
* Check whether all inputs of this transaction are valid (no double spends, scripts & sigs, amounts)