MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetMultisigKeyCount

Function GetMultisigKeyCount

src/script/standard.cpp:118–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118static bool GetMultisigKeyCount(opcodetype opcode, valtype data, int& count)
119{
120 if (IsSmallInteger(opcode)) {
121 count = CScript::DecodeOP_N(opcode);
122 return IsValidMultisigKeyCount(count);
123 }
124
125 if (IsPushdataOp(opcode)) {
126 if (!CheckMinimalPush(data, opcode)) return false;
127 try {
128 count = CScriptNum(data, /* fRequireMinimal = */ true).getint();
129 return IsValidMultisigKeyCount(count);
130 } catch (const scriptnum_error&) {
131 return false;
132 }
133 }
134
135 return false;
136}
137
138static bool MatchMultisig(const CScript& script, int& required_sigs, std::vector<valtype>& pubkeys)
139{

Callers 1

MatchMultisigFunction · 0.85

Calls 6

IsSmallIntegerFunction · 0.85
IsValidMultisigKeyCountFunction · 0.85
IsPushdataOpFunction · 0.85
CheckMinimalPushFunction · 0.85
CScriptNumClass · 0.70
getintMethod · 0.45

Tested by

no test coverage detected