Changeset View
Changeset View
Standalone View
Standalone View
src/policy/policy.h
Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | |||||
bool IsStandard(const CScript &scriptPubKey, txnouttype &whichType); | bool IsStandard(const CScript &scriptPubKey, txnouttype &whichType); | ||||
/** | /** | ||||
* Check for standard transaction types | * Check for standard transaction types | ||||
* @return True if all outputs (scriptPubKeys) use only standard transaction | * @return True if all outputs (scriptPubKeys) use only standard transaction | ||||
* forms | * forms | ||||
*/ | */ | ||||
bool IsStandardTx(const CTransaction &tx, std::string &reason); | bool IsStandardTx(const CTransaction &tx, bool permit_bare_multisig, | ||||
const CFeeRate &dust_relay_fee, std::string &reason); | |||||
/** | /** | ||||
* Check for standard transaction types | * Check for standard transaction types | ||||
* @param[in] mapInputs Map of previous transactions that have outputs we're | * @param[in] mapInputs Map of previous transactions that have outputs we're | ||||
* spending | * spending | ||||
* @return True if all inputs (scriptSigs) use only standard transaction forms | * @return True if all inputs (scriptSigs) use only standard transaction forms | ||||
*/ | */ | ||||
bool AreInputsStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs, | bool AreInputsStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs, | ||||
uint32_t flags); | uint32_t flags); | ||||
/** | /** | ||||
* Compute the virtual transaction size (size, or more if sigops are too | * Compute the virtual transaction size (size, or more if sigops are too | ||||
* dense). | * dense). | ||||
*/ | */ | ||||
int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCount, | int64_t GetVirtualTransactionSize(int64_t nSize, int64_t nSigOpCount, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
int64_t GetVirtualTransactionSize(const CTransaction &tx, int64_t nSigOpCount, | int64_t GetVirtualTransactionSize(const CTransaction &tx, int64_t nSigOpCount, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCount, | int64_t GetVirtualTransactionInputSize(const CTxIn &txin, int64_t nSigOpCount, | ||||
unsigned int bytes_per_sigop); | unsigned int bytes_per_sigop); | ||||
static inline int64_t GetVirtualTransactionSize(const CTransaction &tx) { | |||||
return GetVirtualTransactionSize(tx, 0, 0); | |||||
} | |||||
static inline int64_t GetVirtualTransactionInputSize(const CTxIn &tx) { | |||||
return GetVirtualTransactionInputSize(tx, 0, 0); | |||||
} | |||||
#endif // BITCOIN_POLICY_POLICY_H | #endif // BITCOIN_POLICY_POLICY_H |