From 2c0218f0abaf425af694aab3c56677dee2b2f5a7 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 26 Mar 2018 16:23:01 +0300 Subject: [PATCH] Test --- src/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index e99a73d76..151c42383 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2013,17 +2013,16 @@ bool CheckTxInputs(const CTransaction& tx, CValidationState& state, const CCoins if (nValueIn < tx.GetValueOut()) { fprintf(stderr,"spentheight.%d valuein %s vs %s error\n",nSpendHeight,FormatMoney(nValueIn).c_str(), FormatMoney(tx.GetValueOut()).c_str()); - if ( nSpendHeight > 300000 ) - return state.DoS(100, error("CheckInputs(): %s value in (%s) < value out (%s) diff %.8f", + return state.DoS(100, error("CheckInputs(): %s value in (%s) < value out (%s) diff %.8f", tx.GetHash().ToString(), FormatMoney(nValueIn), FormatMoney(tx.GetValueOut()),((double)nValueIn - tx.GetValueOut())/COIN),REJECT_INVALID, "bad-txns-in-belowout"); } // Tally transaction fees CAmount nTxFee = nValueIn - tx.GetValueOut(); - if (nTxFee < 0 && nSpendHeight > 300000 ) + if (nTxFee < 0) return state.DoS(100, error("CheckInputs(): %s nTxFee < 0", tx.GetHash().ToString()), REJECT_INVALID, "bad-txns-fee-negative"); nFees += nTxFee; - if (!MoneyRange(nFees) && nSpendHeight > 300000 ) + if (!MoneyRange(nFees)) return state.DoS(100, error("CheckInputs(): nFees out of range"), REJECT_INVALID, "bad-txns-fee-outofrange"); return true;