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

Decouple key_search_result() and KeySearch class with an interface.

This commit is contained in:
Henrik Hautakoski 2020-03-19 18:12:33 +01:00
parent a417390bb7
commit d9634f334b
8 changed files with 84 additions and 25 deletions

View file

@ -32,6 +32,7 @@
#include <eoskeygen/crypto/ec.h>
#include <eoskeygen/crypto/WIF.h>
#include <eoskeygen/key_search.h>
#include "cli_key_search_result.h"
#include "core/file.h"
#include "console.h"
#include "benchmark.h"
@ -47,8 +48,9 @@ int option_num_threads = std::thread::hardware_concurrency();
int cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary& dict, int count) {
eoskeygen::KeySearch ks;
eoskeygen::CliKeySearchResult rs(dict);
ks.addDictionary(dict);
ks.setCallback(&rs);
for(auto it = words.begin(); it != words.end(); it++) {
size_t p = eoskeygen::is_base58(*it);