From fdb43df23eb507d1c79b7ae9cc2e61c3e52c8988 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Sat, 28 May 2016 19:22:13 +0200 Subject: [qa] Add GetTransactionSigOpCost unit tests --- src/main.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main.h') diff --git a/src/main.h b/src/main.h index 84a6044bc9..2ffe5770dc 100644 --- a/src/main.h +++ b/src/main.h @@ -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) -- cgit v1.2.3