From 512fc19a89b1786a71a4ef840b7c1ebce5774250 Mon Sep 17 00:00:00 2001 From: Mika Lindqvist Date: Sat, 25 Sep 2021 09:54:36 +0300 Subject: [PATCH] Version 0.4.7 build 1122 --- Dockerfile | 2 +- src/CryptoNoteCore/Currency.cpp | 8 ++++++-- src/version.h.in | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index eda3567d..701bdcda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / ADD https://github.com/just-containers/socklog-overlay/releases/download/v2.1.0-0/socklog-overlay-amd64.tar.gz /tmp/ RUN tar xzf /tmp/socklog-overlay-amd64.tar.gz -C / -ARG TALLEO_VERSION=v0.4.7.1121 +ARG TALLEO_VERSION=v0.4.7.1122 ENV TALLEO_VERSION=${TALLEO_VERSION} # install build dependencies diff --git a/src/CryptoNoteCore/Currency.cpp b/src/CryptoNoteCore/Currency.cpp index c266ba8a..d22317d2 100644 --- a/src/CryptoNoteCore/Currency.cpp +++ b/src/CryptoNoteCore/Currency.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // Copyright (c) 2018-2019, The Bittorium developers -// Copyright (c) 2019, The Talleo developers +// Copyright (c) 2019-2021, The Talleo developers // // This file is part of Bytecoin. // @@ -618,7 +618,11 @@ Difficulty Currency::nextDifficultyZawyLWMA2(uint8_t version, uint32_t blockInde next_D = std::max(next_D, (prev_D*110)/100); } - return static_cast(next_D); + uint64_t nextD = static_cast(next_D); + if (nextD == 0) + return 100; + + return nextD; } Difficulty Currency::nextDifficulty(uint8_t version, uint32_t blockIndex, std::vector timestamps, diff --git a/src/version.h.in b/src/version.h.in index 65013dfd..98c007f9 100644 --- a/src/version.h.in +++ b/src/version.h.in @@ -8,7 +8,7 @@ #define APP_VER_MAJOR 0 #define APP_VER_MINOR 4 #define APP_VER_REV 7 -#define APP_VER_BUILD 1121 +#define APP_VER_BUILD 1122 #define BUILD_COMMIT_ID "@VERSION@" #define PROJECT_VERSION STR(APP_VER_MAJOR) "." STR(APP_VER_MINOR) "." STR(APP_VER_REV)