diff options
| author | Mark Friedenbach <[email protected]> | 2013-08-05 18:27:09 -0700 |
|---|---|---|
| committer | jtimon <[email protected]> | 2014-10-01 19:14:38 +0200 |
| commit | 217a5c92380173ac43d303b1ba9548544121eefd (patch) | |
| tree | d03f8ce3883476f369f20d819fa3e0ef17014e8b /src/main.cpp | |
| parent | Merge pull request #4990 (diff) | |
| download | discoin-217a5c92380173ac43d303b1ba9548544121eefd.tar.xz discoin-217a5c92380173ac43d303b1ba9548544121eefd.zip | |
When transaction outputs exceed inputs, show the offending amounts so as to aid debugging.
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 9a4271eda..c1fabdd55 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 |