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

Method MakeScripts

src/script/descriptor.cpp:792–799  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790protected:
791 std::string ToStringExtra() const override { return strprintf("%i", m_threshold); }
792 std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider&) const override {
793 if (m_sorted) {
794 std::vector<CPubKey> sorted_keys(keys);
795 std::sort(sorted_keys.begin(), sorted_keys.end());
796 return Vector(GetScriptForMultisig(m_threshold, sorted_keys));
797 }
798 return Vector(GetScriptForMultisig(m_threshold, keys));
799 }
800public:
801 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) {}
802 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