From 084f1d4d056360f44ab189c50fe7e2043c160307 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Sun, 11 Oct 2015 05:53:02 +0300 Subject: [PATCH] Call generic implementation only when needed. --- src/kernel.cpp | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/kernel.cpp b/src/kernel.cpp index 52c17af..44ecac7 100644 --- a/src/kernel.cpp +++ b/src/kernel.cpp @@ -461,6 +461,8 @@ extern "C" void sha256_transform(uint32_t *state, const uint32_t *block, int swa extern "C" void sha256_init_4way(uint32_t *state); extern "C" void sha256_transform_4way(uint32_t *state, const uint32_t *block, int swap); +bool fUse4Way = sha256_use_4way() != 0; + class ScanMidstateWorker { public: @@ -505,13 +507,16 @@ public: // Search forward in time from the given timestamp // Stopping search in case of shutting down - for (uint32_t nTimeTx=nIntervalBegin, nMaxTarget32 = nMaxTarget.Get32(7); nTimeTx >& GetSolutions() -- 1.7.1