MCPcopy Create free account
hub / github.com/JeanLucPons/VanitySearch / checkAddr

Method checkAddr

Vanity.cpp:891–972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

889}
890
891void VanitySearch::checkAddr(int prefIdx, uint8_t *hash160, Int &key, int32_t incr, int endomorphism, bool mode) {
892
893 if (hasPattern) {
894
895 // Wildcard search
896 string addr = secp->GetAddress(searchType, mode, hash160);
897
898 for (int i = 0; i < (int)inputPrefixes.size(); i++) {
899
900 if (Wildcard::match(addr.c_str(), inputPrefixes[i].c_str(), caseSensitive)) {
901
902 // Found it !
903 //*((*pi)[i].found) = true;
904 if (checkPrivKey(addr, key, incr, endomorphism, mode)) {
905 nbFoundKey++;
906 patternFound[i] = true;
907 updateFound();
908 }
909
910 }
911
912 }
913
914 return;
915
916 }
917
918 vector<PREFIX_ITEM> *pi = prefixes[prefIdx].items;
919
920 if (onlyFull) {
921
922 // Full addresses
923 for (int i = 0; i < (int)pi->size(); i++) {
924
925 if (stopWhenFound && *((*pi)[i].found))
926 continue;
927
928 if (ripemd160_comp_hash((*pi)[i].hash160, hash160)) {
929
930 // Found it !
931 *((*pi)[i].found) = true;
932 // You believe it ?
933 if (checkPrivKey(secp->GetAddress(searchType, mode, hash160), key, incr, endomorphism, mode)) {
934 nbFoundKey++;
935 updateFound();
936 }
937
938 }
939
940 }
941
942 } else {
943
944
945 char a[64];
946
947 string addr = secp->GetAddress(searchType, mode, hash160);
948

Callers

nothing calls this directly

Calls 2

ripemd160_comp_hashFunction · 0.85
GetAddressMethod · 0.80

Tested by

no test coverage detected