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

Method IsNormalPaymentScript

src/script/script.cpp:271–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271bool CScript::IsNormalPaymentScript() const
272{
273 if(this->size() != 25) return false;
274
275 std::string str;
276 opcodetype opcode;
277 const_iterator pc = begin();
278 int i = 0;
279 while (pc < end())
280 {
281 GetOp(pc, opcode);
282
283 if( i == 0 && opcode != OP_DUP) return false;
284 else if(i == 1 && opcode != OP_HASH160) return false;
285 else if(i == 3 && opcode != OP_EQUALVERIFY) return false;
286 else if(i == 4 && opcode != OP_CHECKSIG) return false;
287 else if(i == 5) return false;
288
289 i++;
290 }
291
292 return true;
293}
294
295bool CScript::IsPayToScriptHash() const
296{

Callers 3

ProcessInstantXFunction · 0.80
ProcessMessageDarksendFunction · 0.80
IsCollateralValidMethod · 0.80

Calls 3

beginFunction · 0.85
endFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected