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

Method MakeScripts

src/script/descriptor.cpp:1324–1331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1322protected:
1323 std::string ToStringExtra() const override { return strprintf("%i", m_threshold); }
1324 std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, std::span<const CScript>, FlatSigningProvider&) const override {
1325 if (m_sorted) {
1326 std::vector<CPubKey> sorted_keys(keys);
1327 std::sort(sorted_keys.begin(), sorted_keys.end());
1328 return Vector(GetScriptForMultisig(m_threshold, sorted_keys));
1329 }
1330 return Vector(GetScriptForMultisig(m_threshold, keys));
1331 }
1332public:
1333 MultisigDescriptor(int threshold, std::vector<std::unique_ptr<PubkeyProvider>> providers, bool sorted = false) : DescriptorImpl(std::move(providers), sorted ? "sortedmulti" : "multi"), m_threshold(threshold), m_sorted(sorted) {}
1334 bool IsSingleType() const final { return true; }

Callers

nothing calls this directly

Calls 4

VectorFunction · 0.85
GetScriptForMultisigFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected