MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / ScriptSigArgsExpected

Function ScriptSigArgsExpected

src/script/standard.cpp:162–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions)
163{
164 switch (t)
165 {
166 case TX_NONSTANDARD:
167 case TX_NULL_DATA:
168 return -1;
169 case TX_PUBKEY:
170 return 1;
171 case TX_PUBKEYHASH:
172 return 2;
173 case TX_MULTISIG:
174 if (vSolutions.size() < 1 || vSolutions[0].size() < 1)
175 return -1;
176 return vSolutions[0][0] + 1;
177 case TX_SCRIPTHASH:
178 return 1; // doesn't include args needed by the script
179 }
180 return -1;
181}
182
183bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
184{

Callers 1

AreInputsStandardFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected