diff --git a/configure.ac b/configure.ac index ed4aaa20da..9a5db943c7 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 0) define(_CLIENT_VERSION_MINOR, 14) define(_CLIENT_VERSION_REVISION, 9) -define(_CLIENT_VERSION_BUILD, 0) +define(_CLIENT_VERSION_BUILD, 1) define(_CLIENT_VERSION_IS_RELEASE, true) define(_COPYRIGHT_YEAR, 2021) define(_COPYRIGHT_HOLDERS,[The %s developers]) diff --git a/src/clientversion.h b/src/clientversion.h index 7f54050f53..26097705d9 100644 --- a/src/clientversion.h +++ b/src/clientversion.h @@ -17,7 +17,7 @@ #define CLIENT_VERSION_MAJOR 0 #define CLIENT_VERSION_MINOR 14 #define CLIENT_VERSION_REVISION 9 -#define CLIENT_VERSION_BUILD 0 +#define CLIENT_VERSION_BUILD 1 //! Set to true for release, false for prerelease or test build #define CLIENT_VERSION_IS_RELEASE true diff --git a/src/validation.cpp b/src/validation.cpp index 9fc2d7c01b..18e0ea96a9 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -4233,6 +4233,11 @@ bool CheckBlockHeader(const CBlockHeader& block, CValidationState& state, const uint256 final_hash; if (block.IsProgPow()) { + // if nHeight is too big progpow_hash_full will use too much memory. This condition allows + // progpow usage until block 2600000 + if (block.nHeight >= progpow::epoch_length*2000) + return state.DoS(50, false, REJECT_INVALID, "invalid-progpow-epoch", false, "invalid epoch number"); + uint256 exp_mix_hash; final_hash = block.GetProgPowHashFull(exp_mix_hash); if (exp_mix_hash != block.mix_hash)