| 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 |