diff options
| author | Jonas Nick <[email protected]> | 2016-05-28 19:22:13 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-06-22 15:43:02 +0200 |
| commit | fdb43df23eb507d1c79b7ae9cc2e61c3e52c8988 (patch) | |
| tree | 990cfcd4b9bd765d300ff2b523f29017395e6c81 /src/main.h | |
| parent | [qa] script_tests: witness tests can specify tx amount (diff) | |
| download | discoin-fdb43df23eb507d1c79b7ae9cc2e61c3e52c8988.tar.xz discoin-fdb43df23eb507d1c79b7ae9cc2e61c3e52c8988.zip | |
[qa] Add GetTransactionSigOpCost unit tests
Diffstat (limited to 'src/main.h')
| -rw-r--r-- | src/main.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h index 84a6044bc..2ffe5770d 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) |