aboutsummaryrefslogtreecommitdiff
path: root/src/main.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-01-25 05:21:20 -0800
committerGavin Andresen <gavinandresen@gmail.com>2012-01-25 05:21:20 -0800
commitb6a35d2d5235585b728c4373d6c0e69e563caec6 (patch)
treea410ffb729166366824922db8b030488177b37f2 /src/main.h
parent341519523f2144349a920efee32ebf0dab74e7ac (diff)
parent137d0685a45d4a02f5773652130704ad135e63f7 (diff)
downloadbitcoin-b6a35d2d5235585b728c4373d6c0e69e563caec6.tar.xz
Merge pull request #773 from gavinandresen/p2shSigOpCount
Simplify counting of P2SH sigops to match BIP 16
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.h b/src/main.h
index ec5623d17d..124b228ec9 100644
--- a/src/main.h
+++ b/src/main.h
@@ -528,14 +528,13 @@ public:
*/
int GetLegacySigOpCount() const;
- /** Count ECDSA signature operations the new (0.6-and-later) way
- This is a better measure of how expensive it is to process this transaction.
+ /** Count ECDSA signature operations in pay-to-script-hash inputs.
@param[in] mapInputs Map of previous transactions that have outputs we're spending
@return maximum number of sigops required to validate this transaction's inputs
@see CTransaction::FetchInputs
*/
- int GetSigOpCount(const MapPrevTx& mapInputs) const;
+ int GetP2SHSigOpCount(const MapPrevTx& mapInputs) const;
/** Amount of bitcoins spent by this transaction.
@return sum of all outputs (note: does not include fees)
@@ -699,11 +698,12 @@ public:
@param[in] pindexBlock
@param[in] fBlock true if called from ConnectBlock
@param[in] fMiner true if called from CreateNewBlock
+ @param[in] fStrictPayToScriptHash true if fully validating p2sh transactions
@return Returns true if all checks succeed
*/
bool ConnectInputs(MapPrevTx inputs,
std::map<uint256, CTxIndex>& mapTestPool, const CDiskTxPos& posThisTx,
- const CBlockIndex* pindexBlock, bool fBlock, bool fMiner);
+ const CBlockIndex* pindexBlock, bool fBlock, bool fMiner, bool fStrictPayToScriptHash=true);
bool ClientConnectInputs();
bool CheckTransaction() const;
bool AcceptToMemoryPool(CTxDB& txdb, bool fCheckInputs=true, bool* pfMissingInputs=NULL);