MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / Expand

Method Expand

src/script/descriptor.cpp:273–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271 }
272
273 bool Expand(int pos, const SigningProvider& arg, std::vector<CScript>& output_scripts, FlatSigningProvider& out) const override
274 {
275 std::vector<CPubKey> pubkeys;
276 pubkeys.reserve(m_providers.size());
277 for (const auto& p : m_providers) {
278 CPubKey key;
279 if (!p->GetPubKey(pos, arg, key)) return false;
280 pubkeys.push_back(key);
281 }
282 for (const CPubKey& key : pubkeys) {
283 out.pubkeys.emplace(key.GetID(), std::move(key));
284 }
285 output_scripts = std::vector<CScript>{GetScriptForMultisig(m_threshold, pubkeys)};
286 return true;
287 }
288};
289
290/** A parsed sh(S) or wsh(S) descriptor. */

Callers

nothing calls this directly

Calls 6

GetScriptForMultisigFunction · 0.85
GetIDMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
GetPubKeyMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected