Changeset View
Changeset View
Standalone View
Standalone View
src/script/standard.cpp
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | if (script.size() < 1 || script.back() != OP_CHECKMULTISIG) { | ||||
return false; | return false; | ||||
} | } | ||||
if (!script.GetOp(it, opcode, data) || !IsSmallInteger(opcode)) { | if (!script.GetOp(it, opcode, data) || !IsSmallInteger(opcode)) { | ||||
return false; | return false; | ||||
} | } | ||||
required = CScript::DecodeOP_N(opcode); | required = CScript::DecodeOP_N(opcode); | ||||
while (script.GetOp(it, opcode, data) && CPubKey::ValidSize(data)) { | while (script.GetOp(it, opcode, data) && CPubKey::ValidSize(data)) { | ||||
if (opcode < 0 || opcode > OP_PUSHDATA4 || | |||||
!CheckMinimalPush(data, opcode)) { | |||||
return false; | |||||
} | |||||
pubkeys.emplace_back(std::move(data)); | pubkeys.emplace_back(std::move(data)); | ||||
} | } | ||||
if (!IsSmallInteger(opcode)) { | if (!IsSmallInteger(opcode)) { | ||||
return false; | return false; | ||||
} | } | ||||
unsigned int keys = CScript::DecodeOP_N(opcode); | unsigned int keys = CScript::DecodeOP_N(opcode); | ||||
if (pubkeys.size() != keys || keys < required) { | if (pubkeys.size() != keys || keys < required) { | ||||
return false; | return false; | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |