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

Method getDiffuclty

Vanity.cpp:583–604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

581// ----------------------------------------------------------------------------
582
583double VanitySearch::getDiffuclty() {
584
585 double min = pow(2,160);
586
587 if (onlyFull)
588 return min;
589
590 for (int i = 0; i < (int)usedPrefix.size(); i++) {
591 int p = usedPrefix[i];
592 if (prefixes[p].items) {
593 for (int j = 0; j < (int)prefixes[p].items->size(); j++) {
594 if (!*((*prefixes[p].items)[j].found)) {
595 if ((*prefixes[p].items)[j].difficulty < min)
596 min = (*prefixes[p].items)[j].difficulty;
597 }
598 }
599 }
600 }
601
602 return min;
603
604}
605
606double log1(double x) {
607 // Use taylor series to approximate log(1-x)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected