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

Method GetKeyCount

src/script/descriptor.cpp:1101–1116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1099 }
1100
1101 size_t GetKeyCount() const final
1102 {
1103 size_t count{0};
1104 std::vector<const DescriptorImpl*> todo = {this};
1105 while (!todo.empty()) {
1106 const DescriptorImpl* desc = todo.back();
1107 todo.pop_back();
1108 for (const auto& p : desc->m_pubkey_args) {
1109 count += p->GetKeyCount();
1110 }
1111 for (const auto& s : desc->m_subdescriptor_args) {
1112 todo.push_back(s.get());
1113 }
1114 }
1115 return count;
1116 }
1117
1118 // NOLINTNEXTLINE(misc-no-recursion)
1119 bool CanSelfExpand() const override

Callers

nothing calls this directly

Calls 6

emptyMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45
GetKeyCountMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected