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

Function PushAll

src/script/sign.cpp:728–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728static CScript PushAll(const std::vector<valtype>& values)
729{
730 CScript result;
731 for (const valtype& v : values) {
732 if (v.size() == 0) {
733 result << OP_0;
734 } else if (v.size() == 1 && v[0] >= 1 && v[0] <= 16) {
735 result << CScript::EncodeOP_N(v[0]);
736 } else if (v.size() == 1 && v[0] == 0x81) {
737 result << OP_1NEGATE;
738 } else {
739 result << v;
740 }
741 }
742 return result;
743}
744
745bool ProduceSignature(const SigningProvider& provider, const BaseSignatureCreator& creator, const CScript& fromPubKey, SignatureData& sigdata)
746{

Callers 1

ProduceSignatureFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected