Changeset View
Changeset View
Standalone View
Standalone View
src/policy/policy.cpp
Show First 20 Lines • Show All 148 Lines • ▼ Show 20 Lines | bool AreInputsStandard(const CTransaction &tx, const CCoinsViewCache &mapInputs, | ||||
for (const CTxIn &in : tx.vin) { | for (const CTxIn &in : tx.vin) { | ||||
const CTxOut &prev = mapInputs.GetOutputFor(in); | const CTxOut &prev = mapInputs.GetOutputFor(in); | ||||
std::vector<std::vector<uint8_t>> vSolutions; | std::vector<std::vector<uint8_t>> vSolutions; | ||||
txnouttype whichType = Solver(prev.scriptPubKey, vSolutions); | txnouttype whichType = Solver(prev.scriptPubKey, vSolutions); | ||||
if (whichType == TX_NONSTANDARD) { | if (whichType == TX_NONSTANDARD) { | ||||
return false; | return false; | ||||
} else if (whichType == TX_SCRIPTHASH) { | |||||
if (prev.scriptPubKey.GetSigOpCount(flags, in.scriptSig) > | |||||
MAX_P2SH_SIGOPS) { | |||||
return false; | |||||
} | |||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
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) { | ||||
Show All 14 Lines |