| 863 | return Vector(GetScriptForDestination(output)); |
| 864 | } |
| 865 | bool ToStringSubScriptHelper(const SigningProvider* arg, std::string& ret, const StringType type, const DescriptorCache* cache = nullptr) const override |
| 866 | { |
| 867 | if (m_depths.empty()) return true; |
| 868 | std::vector<bool> path; |
| 869 | for (size_t pos = 0; pos < m_depths.size(); ++pos) { |
| 870 | if (pos) ret += ','; |
| 871 | while ((int)path.size() <= m_depths[pos]) { |
| 872 | if (path.size()) ret += '{'; |
| 873 | path.push_back(false); |
| 874 | } |
| 875 | std::string tmp; |
| 876 | if (!m_subdescriptor_args[pos]->ToStringHelper(arg, tmp, type, cache)) return false; |
| 877 | ret += std::move(tmp); |
| 878 | while (!path.empty() && path.back()) { |
| 879 | if (path.size() > 1) ret += '}'; |
| 880 | path.pop_back(); |
| 881 | } |
| 882 | if (!path.empty()) path.back() = true; |
| 883 | } |
| 884 | return true; |
| 885 | } |
| 886 | public: |
| 887 | TRDescriptor(std::unique_ptr<PubkeyProvider> internal_key, std::vector<std::unique_ptr<DescriptorImpl>> descs, std::vector<int> depths) : |
| 888 | DescriptorImpl(Vector(std::move(internal_key)), std::move(descs), "tr"), m_depths(std::move(depths)) |
nothing calls this directly
no test coverage detected