Improved local tx error messages (RIPD-720)

Failed local built transactions report the specific error.
This commit is contained in:
Miguel Portilla
2015-03-23 13:45:08 -04:00
committed by Tom Ritchford
parent 1fedede771
commit 5e70db651d
8 changed files with 56 additions and 55 deletions

View File

@@ -1437,10 +1437,14 @@ PeerImp::checkTransaction (Job&, int flags,
}
auto validate = (flags & SF_SIGGOOD) ? Validate::NO : Validate::YES;
auto tx = std::make_shared<Transaction> (stx, validate);
std::string reason;
auto tx = std::make_shared<Transaction> (stx, validate, reason);
if (tx->getStatus () == INVALID)
{
if (! reason.empty ())
p_journal_.trace << "Exception checking transaction: " << reason;
getApp().getHashRouter ().setFlag (stx->getTransactionID (), SF_BAD);
charge (Resource::feeInvalidSignature);
return;