Browse Source

tabs formatting

pull/86/head
acetone 1 year ago
parent
commit
fe84f6a996
  1. 30
      vanitygen.cpp

30
vanitygen.cpp

@ -268,10 +268,10 @@ bool thread_find(uint8_t * buf, const char * prefix, int id_thread, unsigned lon
while(!found) while(!found)
{ {
if (! throughput--) if (! throughput--)
{ {
throughput = original_throughput; throughput = original_throughput;
} }
memcpy (state1, state, 32); memcpy (state1, state, 32);
// calculate hash of block with nonce // calculate hash of block with nonce
@ -431,24 +431,24 @@ int main (int argc, char * argv[])
if(options.threads <= 0) if(options.threads <= 0)
{ {
options.threads = std::thread::hardware_concurrency(); options.threads = std::thread::hardware_concurrency();
} }
std::cout << "Vanity generator started in " << options.threads << " threads" << std::endl; std::cout << "Vanity generator started in " << options.threads << " threads" << std::endl;
std::vector<std::thread> threads(options.threads); std::vector<std::thread> threads(options.threads);
unsigned long long thoughtput = 0x4F4B5A37; unsigned long long thoughtput = 0x4F4B5A37;
for (unsigned int j = options.threads; j--; ) for (unsigned int j = options.threads; j--; )
{ {
threads[j] = std::thread(thread_find, KeyBuf, argv[1], j, thoughtput); threads[j] = std::thread(thread_find, KeyBuf, argv[1], j, thoughtput);
thoughtput += 1000; thoughtput += 1000;
} }
processFlipper(argv[1]); processFlipper(argv[1]);
for (unsigned int j = 0; j < (unsigned int)options.threads;j++) for (unsigned int j = 0; j < (unsigned int)options.threads;j++)
threads[j].join(); threads[j].join();
if(options.outputpath.empty()) options.outputpath.assign(DEF_OUTNAME); if(options.outputpath.empty()) options.outputpath.assign(DEF_OUTNAME);

Loading…
Cancel
Save