aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Friedenbach <mark@monetize.io>2013-08-05 18:27:09 -0700
committerjtimon <jtimon@blockstream.io>2014-10-01 19:14:38 +0200
commit217a5c92380173ac43d303b1ba9548544121eefd (patch)
treed03f8ce3883476f369f20d819fa3e0ef17014e8b
parenta329097f925ef20a724fa7e5241b0e9d75d42bb9 (diff)
When transaction outputs exceed inputs, show the offending amounts so as to aid debugging.
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 9a4271eda2..c1fabdd55e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,6 +17,7 @@
#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
+#include "utilmoneystr.h"
#include <sstream>
@@ -1361,7 +1362,8 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
}
if (nValueIn < tx.GetValueOut())
- return state.DoS(100, error("CheckInputs() : %s value in < value out", tx.GetHash().ToString()),
+ return state.DoS(100, error("CheckInputs() : %s value in (%s) < value out (%s)",
+ tx.GetHash().ToString(), FormatMoney(nValueIn), FormatMoney(tx.GetValueOut())),
REJECT_INVALID, "bad-txns-in-belowout");
// Tally transaction fees