diff --git a/sources/main.cpp b/sources/main.cpp index af523e3..bf3f5d2 100644 --- a/sources/main.cpp +++ b/sources/main.cpp @@ -128,7 +128,6 @@ void miner_thread() noexcept { alignas(32) Key seed; KeysBox keys; Address rawAddr; - unsigned char ones = 0; std::random_device rd; unsigned long state = static_cast(rd()); printf("Using seed: %lu\n", state); @@ -136,8 +135,7 @@ void miner_thread() noexcept { rmbytes(seed, state); //sign_keypair(keys.PublicKey, keys.PrivateKey, seed); crypto_sign_ed25519_seed_keypair(keys.PublicKey, keys.PrivateKey, seed); - ones = getZeros(keys.PublicKey); - if (ones > conf.high.load()) { + if (unsigned char ones = getZeros(keys.PublicKey); ones > conf.high.load()) { conf.high.store(ones); invertKey(keys.PublicKey, inv); getRawAddress(ones, inv, rawAddr);