From 65d056aeae45edc166363a2b002244d792959e44 Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 12 Dec 2018 18:31:32 +0800 Subject: [PATCH] use the predefined diff variable for next-diff --- src/cryptonote_core/blockchain.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index 0154391ce..f061909ce 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -879,15 +879,15 @@ difficulty_type Blockchain::get_difficulty_for_next_block() difficulty_type diff = next_difficulty(timestamps, difficulties, target); if (version >= 11) { - difficulty_type diff = next_difficulty_v5(timestamps, difficulties, target); + diff = next_difficulty_v5(timestamps, difficulties, target); } else if (version == 10) { - difficulty_type diff = next_difficulty_v4(timestamps, difficulties, height); + diff = next_difficulty_v4(timestamps, difficulties, height); } else if (version == 9) { - difficulty_type diff = next_difficulty_v3(timestamps, difficulties); + diff = next_difficulty_v3(timestamps, difficulties); } else if (version == 8) { - difficulty_type diff = next_difficulty_v2(timestamps, difficulties, target); + diff = next_difficulty_v2(timestamps, difficulties, target); } else { - difficulty_type diff = next_difficulty(timestamps, difficulties, target); + diff = next_difficulty(timestamps, difficulties, target); } CRITICAL_REGION_LOCAL1(m_difficulty_lock);