diff --git a/src/main.cpp b/src/main.cpp index b8ce5dd2f0..4c9b9dcd31 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1072,8 +1072,10 @@ unsigned int TargetGetLength(unsigned int nBits) bool TargetGetMint(unsigned int nBits, uint64& nMint) { nMint = 0; - static uint64 nMintLimit = 50 * COIN; + static uint64 nMintLimit = 999llu * COIN; CBigNum bnMint = nMintLimit; + if (TargetGetLength(nBits) < nTargetMinLength) + return error("TargetGetMint() : length below minimum required, nBits=%08x", nBits); bnMint = (bnMint << nFractionalBits) / nBits; bnMint = (bnMint << nFractionalBits) / nBits; bnMint = (bnMint / CENT) * CENT; // mint value rounded to cent