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

Function Check

src/test/descriptor_tests.cpp:489–508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489void Check(const std::string& prv, const std::string& pub, const std::string& norm_pub, int flags,
490 const std::vector<std::vector<std::string>>& scripts, const std::optional<OutputType>& type, std::optional<uint256> op_desc_id = std::nullopt,
491 const std::set<std::vector<uint32_t>>& paths = ONLY_EMPTY, uint32_t spender_nlocktime=0,
492 uint32_t spender_nsequence=CTxIn::SEQUENCE_FINAL, std::map<std::vector<uint8_t>, std::vector<uint8_t>> preimages={},
493 std::optional<std::string> expected_prv = std::nullopt, std::optional<std::string> expected_pub = std::nullopt, int desc_index = 0)
494{
495 // Do not replace apostrophes with 'h' in prv and pub
496 DoCheck(prv, pub, norm_pub, flags, scripts, type, op_desc_id, paths, /*replace_apostrophe_with_h_in_prv=*/false,
497 /*replace_apostrophe_with_h_in_pub=*/false, /*spender_nlocktime=*/spender_nlocktime,
498 /*spender_nsequence=*/spender_nsequence, /*preimages=*/preimages,
499 expected_prv, expected_pub, desc_index);
500
501 // Replace apostrophes with 'h' both in prv and in pub, if apostrophes are found in both
502 if (prv.find('\'') != std::string::npos && pub.find('\'') != std::string::npos) {
503 DoCheck(prv, pub, norm_pub, flags, scripts, type, op_desc_id, paths, /*replace_apostrophe_with_h_in_prv=*/true,
504 /*replace_apostrophe_with_h_in_pub=*/true, /*spender_nlocktime=*/spender_nlocktime,
505 /*spender_nsequence=*/spender_nsequence, /*preimages=*/preimages,
506 expected_prv, expected_pub, desc_index);
507 }
508}
509
510void CheckMultipath(const std::string& prv,
511 const std::string& pub,

Callers 15

SetMethod · 0.85
SizeMethod · 0.85
AddMethod · 0.85
GoodMethod · 0.85
AttemptMethod · 0.85
ResolveCollisionsMethod · 0.85
SelectTriedCollisionMethod · 0.85
SelectMethod · 0.85
GetAddrMethod · 0.85
GetEntriesMethod · 0.85
ConnectedMethod · 0.85
SetServicesMethod · 0.85

Calls 2

DoCheckFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected