Changeset View
Changeset View
Standalone View
Standalone View
src/policy/policy.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | bool IsStandard(const CScript &scriptPubKey, txnouttype &whichType) { | ||||
if (!Solver(scriptPubKey, whichType, vSolutions)) { | if (!Solver(scriptPubKey, whichType, vSolutions)) { | ||||
return false; | return false; | ||||
} | } | ||||
if (whichType == TX_MULTISIG) { | if (whichType == TX_MULTISIG) { | ||||
uint8_t m = vSolutions.front()[0]; | uint8_t m = vSolutions.front()[0]; | ||||
uint8_t n = vSolutions.back()[0]; | uint8_t n = vSolutions.back()[0]; | ||||
// Support up to x-of-3 multisig txns as standard | // Support up to x-of-3 multisig txns as standard | ||||
if (n < 1 || n > 3) return false; | if (n < 1 || n > 3) { | ||||
if (m < 1 || m > n) return false; | return false; | ||||
} | |||||
if (m < 1 || m > n) { | |||||
return false; | |||||
} | |||||
} else if (whichType == TX_NULL_DATA) { | } else if (whichType == TX_NULL_DATA) { | ||||
if (!fAcceptDatacarrier) { | if (!fAcceptDatacarrier) { | ||||
return false; | return false; | ||||
} | } | ||||
unsigned nMaxDatacarrierBytes = | unsigned nMaxDatacarrierBytes = | ||||
gArgs.GetArg("-datacarriersize", MAX_OP_RETURN_RELAY); | gArgs.GetArg("-datacarriersize", MAX_OP_RETURN_RELAY); | ||||
if (scriptPubKey.size() > nMaxDatacarrierBytes) { | if (scriptPubKey.size() > nMaxDatacarrierBytes) { | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |