diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2014-10-11 22:41:05 +0000 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2015-06-26 17:59:10 +0200 |
commit | 9238ecb41752e097443d0bc117df35ebd4ac932e (patch) | |
tree | 31c253bebd26069a8917cb1c993f72d4bb604538 /src/policy/policy.h | |
parent | 627b9deff4e8e18fc6d001b6eb9818c13c648820 (diff) |
Policy: MOVEONLY: 3 functions to policy.o:
- [script/standard.o] IsStandard
- [main.o] IsStandardTx
- [main.o] AreInputsStandard
Also, don't use namespace std in policy.cpp
Diffstat (limited to 'src/policy/policy.h')
-rw-r--r-- | src/policy/policy.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/policy/policy.h b/src/policy/policy.h index 48e192d559..1551aecde8 100644 --- a/src/policy/policy.h +++ b/src/policy/policy.h @@ -10,6 +10,10 @@ #include "script/interpreter.h" #include "script/standard.h" +#include <string> + +class CCoinsViewCache; + /** Default for -blockmaxsize and -blockminsize, which control the range of sizes the mining code will create **/ static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000; static const unsigned int DEFAULT_BLOCK_MIN_SIZE = 0; @@ -38,4 +42,17 @@ static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY /** For convenience, standard but not mandatory verify flags. */ static const unsigned int STANDARD_NOT_MANDATORY_VERIFY_FLAGS = STANDARD_SCRIPT_VERIFY_FLAGS & ~MANDATORY_SCRIPT_VERIFY_FLAGS; +bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType); + /** + * Check for standard transaction types + * @return True if all outputs (scriptPubKeys) use only standard transaction forms + */ +bool IsStandardTx(const CTransaction& tx, std::string& reason); + /** + * Check for standard transaction types + * @param[in] mapInputs Map of previous transactions that have outputs we're spending + * @return True if all inputs (scriptSigs) use only standard transaction forms + */ +bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs); + #endif // BITCOIN_POLICY_H |