Handle parse errors.
authorCryptoManiac <balthazar@yandex.ru>
Tue, 3 May 2016 15:18:51 +0000 (18:18 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Tue, 3 May 2016 15:18:51 +0000 (18:18 +0300)
src/miner.cpp

index 7421aa3..55e4fec 100644 (file)
@@ -159,8 +159,11 @@ CBlock* CreateNewBlock(CWallet* pwallet, CTransaction *txCoinStake)
     // 1-satoshi-fee transactions. It should be set above the real
     // cost to you of processing a transaction.
     auto nMinTxFee = MIN_TX_FEE;
-    if (mapArgs.count("-mintxfee"))
-        ParseMoney(mapArgs["-mintxfee"], nMinTxFee);
+    if (mapArgs.count("-mintxfee")) {
+        bool fResult = ParseMoney(mapArgs["-mintxfee"], nMinTxFee);
+        if (!fResult) // Parse error
+            nMinTxFee = MIN_TX_FEE;
+    }
 
     auto pindexPrev = pindexBest;