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

Method Clone

src/script/descriptor.cpp:1577–1583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1575 }
1576
1577 std::unique_ptr<DescriptorImpl> Clone() const override
1578 {
1579 std::vector<std::unique_ptr<DescriptorImpl>> subdescs;
1580 subdescs.reserve(m_subdescriptor_args.size());
1581 std::transform(m_subdescriptor_args.begin(), m_subdescriptor_args.end(), std::back_inserter(subdescs), [](const std::unique_ptr<DescriptorImpl>& d) { return d->Clone(); });
1582 return std::make_unique<TRDescriptor>(m_pubkey_args.at(0)->Clone(), std::move(subdescs), m_depths);
1583 }
1584};
1585
1586/* We instantiate Miniscript here with a simple integer as key type.

Callers

nothing calls this directly

Calls 6

reserveMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
CloneMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected