1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-17 03:50:03 +02:00

key_search: split key_search() function into key_search() and key_search_n()

This commit is contained in:
Henrik Hautakoski 2020-01-10 09:27:49 +01:00
parent f4e2b1e162
commit 77d63a5c36
3 changed files with 29 additions and 15 deletions

View file

@ -65,11 +65,11 @@ static void thread_search(const strlist_t& words, int n) {
// Launch threads.
for(int i = 0; i < t.size(); i++) {
t[i] = std::thread(key_search, words, d);
t[i] = std::thread(key_search_n, words, d);
}
// Use main thread for 1 search
key_search(words, d + m);
key_search_n(words, d + m);
// Wait for all threads to compelete.
for(int i = 0; i < t.size(); i++) {
@ -77,7 +77,7 @@ static void thread_search(const strlist_t& words, int n) {
}
}
#else
#define search_func key_search
#define search_func key_search_n
#endif
void cmd_search(int argc, char **argv) {