| 220 | bool fIsBareMultisigStd = false; |
| 221 | |
| 222 | const char *CScript::IsMempoolbanned() const |
| 223 | { |
| 224 | if (this->size() >= 7 && (*this)[0] == OP_DUP) |
| 225 | { |
| 226 | // pay-to-pubkeyhash |
| 227 | uint32_t pfx = ntohl(*(uint32_t*)&this->data()[3]); |
| 228 | unsigned i; |
| 229 | |
| 230 | for (i = 0; i < (sizeof(MempoolbannedPrefixes) / sizeof(MempoolbannedPrefixes[0])); ++i) |
| 231 | if (pfx >= MempoolbannedPrefixes[i].begin && pfx <= MempoolbannedPrefixes[i].end) |
| 232 | return MempoolbannedPrefixes[i].name; |
| 233 | } |
| 234 | else if (!fIsBareMultisigStd) |
| 235 | { |
| 236 | txnouttype type; |
| 237 | vector<vector<unsigned char> > vSolutions; |
| 238 | Solver(*this, type, vSolutions); |
| 239 | if (type == TX_MULTISIG) |
| 240 | return "bare multisig"; |
| 241 | } |
| 242 | |
| 243 | return NULL; |
| 244 | } |
| 245 | |
| 246 | |
| 247 | unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const |
no test coverage detected