MCPcopy Create free account
hub / github.com/albertobsd/keyhunt / thread_process

Function thread_process

keyhunt_legacy.cpp:2530–3115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2528DWORD WINAPI thread_process(LPVOID vargp) {
2529#else
2530void *thread_process(void *vargp) {
2531#endif
2532 struct tothread *tt;
2533
2534 Point pts[CPU_GRP_SIZE];
2535 Point endomorphism_beta[CPU_GRP_SIZE];
2536 Point endomorphism_beta2[CPU_GRP_SIZE];
2537 Point endomorphism_negeted_point[4];
2538
2539
2540 Int dx[CPU_GRP_SIZE / 2 + 1];
2541 IntGroup *grp = new IntGroup(CPU_GRP_SIZE / 2 + 1);
2542 Point startP;
2543 Int dy;
2544 Int dyn;
2545 Int _s;
2546 Int _p;
2547 Point pp;
2548 Point pn;
2549 int l,pp_offset,pn_offset;
2550 int i,hLength = (CPU_GRP_SIZE / 2 - 1);
2551 uint64_t j,count;
2552 Point R,temporal,publickey;
2553 int r,thread_number,continue_flag = 1,k;
2554 char *hextemp = NULL;
2555
2556 char publickeyhashrmd160[20];
2557 char publickeyhashrmd160_uncompress[4][20];
2558 char rawvalue[32];
2559
2560 char publickeyhashrmd160_endomorphism[12][4][20];
2561
2562 bool calculate_y = FLAGSEARCH == SEARCH_UNCOMPRESS || FLAGSEARCH == SEARCH_BOTH;
2563 Int key_mpz,keyfound,temp_stride;
2564 tt = (struct tothread *)vargp;
2565 thread_number = tt->nt;
2566 free(tt);
2567 grp->Set(dx);
2568
2569 do {
2570 if(FLAGRANDOM){
2571 key_mpz.Rand(&n_range_start,&n_range_end);
2572 }
2573 else {
2574 if(n_range_start.IsLower(&n_range_end)) {
2575#if defined(_WIN64) && !defined(__CYGWIN__)
2576 WaitForSingleObject(write_random, INFINITE);
2577 key_mpz.Set(&n_range_start);
2578 n_range_start.Add(N_SEQUENTIAL_MAX);
2579 ReleaseMutex(write_random);
2580#else
2581 pthread_mutex_lock(&write_random);
2582 key_mpz.Set(&n_range_start);
2583 n_range_start.Add(N_SEQUENTIAL_MAX);
2584 pthread_mutex_unlock(&write_random);
2585#endif
2586 }
2587 else {

Callers

nothing calls this directly

Calls 15

bloom_checkFunction · 0.85
generate_binaddress_ethFunction · 0.70
searchbinaryFunction · 0.70
writekeyFunction · 0.70
writekeyethFunction · 0.70
SetMethod · 0.45
RandMethod · 0.45
IsLowerMethod · 0.45
AddMethod · 0.45
GetBase16Method · 0.45
SetInt32Method · 0.45
MultMethod · 0.45

Tested by

no test coverage detected