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

Function PushAll

src/script/sign.cpp:329–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

327}
328
329static CScript PushAll(const std::vector<valtype>& values)
330{
331 CScript result;
332 for (const valtype& v : values) {
333 if (v.size() == 0) {
334 result << OP_0;
335 } else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) {
336 result << CScript::EncodeOP_N(v[0]);
337 } else if (v.size() == 1 && v[0] == 0x81) {
338 result << OP_1NEGATE;
339 } else {
340 result << v;
341 }
342 }
343 return result;
344}
345
346bool ProduceSignature(const SigningProvider& provider, const BaseSignatureCreator& creator, const CScript& fromPubKey, SignatureData& sigdata, unsigned int additional_flags)
347{

Callers 1

ProduceSignatureFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected