From b4142f93c024aed8ca9b54bc6b83141f55421624 Mon Sep 17 00:00:00 2001 From: CryptoManiac Date: Tue, 3 May 2016 18:18:51 +0300 Subject: [PATCH] Handle parse errors. --- src/miner.cpp | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/miner.cpp b/src/miner.cpp index 7421aa3..55e4fec 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -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; -- 1.7.1