mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Improved local tx error messages (RIPD-720)
Failed local built transactions report the specific error.
This commit is contained in:
committed by
Tom Ritchford
parent
1fedede771
commit
5e70db651d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user