MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / PushAll

Function PushAll

src/test/transaction_tests.cpp:464–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464static CScript PushAll(const std::vector<valtype>& values)
465{
466 CScript result;
467 for (const valtype& v : values) {
468 if (v.size() == 0) {
469 result << OP_0;
470 } else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) {
471 result << CScript::EncodeOP_N(v[0]);
472 } else if (v.size() == 1 && v[0] == 0x81) {
473 result << OP_1NEGATE;
474 } else {
475 result << v;
476 }
477 }
478 return result;
479}
480
481static void ReplaceRedeemScript(CScript& script, const CScript& redeemScript)
482{

Callers 1

ReplaceRedeemScriptFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected