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

Method GetMaxKeyExpr

src/script/descriptor.cpp:1084–1099  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1082 }
1083
1084 uint32_t GetMaxKeyExpr() const final
1085 {
1086 uint32_t max_key_expr{0};
1087 std::vector<const DescriptorImpl*> todo = {this};
1088 while (!todo.empty()) {
1089 const DescriptorImpl* desc = todo.back();
1090 todo.pop_back();
1091 for (const auto& p : desc->m_pubkey_args) {
1092 max_key_expr = std::max(max_key_expr, p->m_expr_index);
1093 }
1094 for (const auto& s : desc->m_subdescriptor_args) {
1095 todo.push_back(s.get());
1096 }
1097 }
1098 return max_key_expr;
1099 }
1100
1101 size_t GetKeyCount() const final
1102 {

Callers 2

DoCheckFunction · 0.45
TestDescriptorFunction · 0.45

Calls 5

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

Tested by 2

DoCheckFunction · 0.36
TestDescriptorFunction · 0.36