From 0ea9fa65b696033c7e175d7b9a123f3df4d6ff60 Mon Sep 17 00:00:00 2001 From: Michael Toutonghi Date: Sun, 20 May 2018 13:59:28 -0700 Subject: [PATCH] Another tweak for cutting off POS at 8 consecutive --- src/pow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 3745ce30b..e404ca652 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -202,7 +202,7 @@ uint32_t lwmaGetNextPOSRequired(const CBlockIndex* pindexLast, const Consensus:: } pindexFirst = pindexLast; - std::vector idx; + std::vector idx = std::vector(); idx.resize(N); for (int i = N - 1; i >= 0; i--) @@ -246,7 +246,7 @@ uint32_t lwmaGetNextPOSRequired(const CBlockIndex* pindexLast, const Consensus:: if ((j - i) >= VERUS_CONSECUTIVE_POS_THRESHOLD) { // if this is real time, return zero - if (i == (N - 1)) + if (i > (N - VERUS_CONSECUTIVE_POS_THRESHOLD)) { // target of 0 (virtually impossible), if we hit max consecutive POS blocks nextTarget.SetCompact(0);