MCPcopy Create free account
hub / github.com/LUX-Core/lux / IsMempoolbanned

Method IsMempoolbanned

src/script/script.cpp:222–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220bool fIsBareMultisigStd = false;
221
222const 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
247unsigned int CScript::GetSigOpCount(const CScript& scriptSig) const

Callers 1

BOOST_FOREACHFunction · 0.80

Calls 3

SolverFunction · 0.85
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected