Changeset View
Changeset View
Standalone View
Standalone View
src/script/script.cpp
Show First 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | bool CScriptNum::MinimallyEncode(std::vector<uint8_t> &data) { | ||||
} | } | ||||
// If we the whole thing is zeros, then we have a zero. | // If we the whole thing is zeros, then we have a zero. | ||||
data = {}; | data = {}; | ||||
return true; | return true; | ||||
} | } | ||||
uint32_t CScript::GetSigOpCount(uint32_t flags, bool fAccurate) const { | uint32_t CScript::GetSigOpCount(uint32_t flags, bool fAccurate) const { | ||||
if (flags & SCRIPT_ZERO_SIGOPS) { | |||||
return 0; | |||||
} | |||||
uint32_t n = 0; | uint32_t n = 0; | ||||
const_iterator pc = begin(); | const_iterator pc = begin(); | ||||
opcodetype lastOpcode = OP_INVALIDOPCODE; | opcodetype lastOpcode = OP_INVALIDOPCODE; | ||||
while (pc < end()) { | while (pc < end()) { | ||||
opcodetype opcode; | opcodetype opcode; | ||||
if (!GetOp(pc, opcode)) { | if (!GetOp(pc, opcode)) { | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |