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

Method ToStringSubScriptHelper

src/script/descriptor.cpp:916–932  ·  view source on GitHub ↗

NOLINTNEXTLINE(misc-no-recursion)

Source from the content-addressed store, hash-verified

914
915 // NOLINTNEXTLINE(misc-no-recursion)
916 virtual bool ToStringSubScriptHelper(const SigningProvider* arg, std::string& ret, const StringType type, const DescriptorCache* cache = nullptr) const
917 {
918 size_t pos = 0;
919 bool is_private{type == StringType::PRIVATE};
920 // For private string output, track if at least one key has a private key available.
921 // Initialize to true for non-private types.
922 bool any_success{!is_private};
923 for (const auto& scriptarg : m_subdescriptor_args) {
924 if (pos++) ret += ",";
925 std::string tmp;
926 bool subscript_res{scriptarg->ToStringHelper(arg, tmp, type, cache)};
927 if (!is_private && !subscript_res) return false;
928 any_success = any_success || subscript_res;
929 ret += tmp;
930 }
931 return any_success;
932 }
933
934 // NOLINTNEXTLINE(misc-no-recursion)
935 virtual bool ToStringHelper(const SigningProvider* arg, std::string& out, const StringType type, const DescriptorCache* cache = nullptr) const

Callers

nothing calls this directly

Calls 1

ToStringHelperMethod · 0.45

Tested by

no test coverage detected