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

Function GetKeyData

src/test/descriptor_tests.cpp:125–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123const std::set<std::vector<uint32_t>> ONLY_EMPTY{{}};
124
125std::set<CPubKey> GetKeyData(const FlatSigningProvider& provider, int flags) {
126 std::set<CPubKey> ret;
127 for (const auto& [_, pubkey] : provider.pubkeys) {
128 if (flags & XONLY_KEYS) {
129 unsigned char bytes[33];
130 BOOST_CHECK_EQUAL(pubkey.size(), 33);
131 std::copy(pubkey.begin(), pubkey.end(), bytes);
132 bytes[0] = 0x02;
133 CPubKey norm_pubkey{bytes};
134 ret.insert(norm_pubkey);
135 } else {
136 ret.insert(pubkey);
137 }
138 }
139 return ret;
140}
141
142std::set<std::pair<CPubKey, KeyOriginInfo>> GetKeyOriginData(const FlatSigningProvider& provider, int flags) {
143 std::set<CKeyID> ignored;

Callers 1

DoCheckFunction · 0.85

Calls 4

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected