Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.h
Show First 20 Lines • Show All 619 Lines • ▼ Show 20 Lines | int FindAndDelete(const CScript &b) { | ||||
if (nFound > 0) { | if (nFound > 0) { | ||||
result.insert(result.end(), pc2, end()); | result.insert(result.end(), pc2, end()); | ||||
*this = result; | *this = result; | ||||
} | } | ||||
return nFound; | return nFound; | ||||
} | } | ||||
int Find(opcodetype op) const { | |||||
int nFound = 0; | |||||
opcodetype opcode; | |||||
for (const_iterator pc = begin(); pc != end() && GetOp(pc, opcode);) { | |||||
if (opcode == op) { | |||||
++nFound; | |||||
} | |||||
} | |||||
return nFound; | |||||
} | |||||
/** | /** | ||||
* Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs as 20 sigops. With | * Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs as 20 sigops. With | ||||
* pay-to-script-hash, that changed: CHECKMULTISIGs serialized in scriptSigs | * pay-to-script-hash, that changed: CHECKMULTISIGs serialized in scriptSigs | ||||
* are counted more accurately, assuming they are of the form | * are counted more accurately, assuming they are of the form | ||||
* ... OP_N CHECKMULTISIG ... | * ... OP_N CHECKMULTISIG ... | ||||
*/ | */ | ||||
uint32_t GetSigOpCount(uint32_t flags, bool fAccurate) const; | uint32_t GetSigOpCount(uint32_t flags, bool fAccurate) const; | ||||
▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines |