mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Really disallow negative amounts for CreditSet.
This commit is contained in:
@@ -253,7 +253,13 @@ TER TransactionEngine::doCreditSet(const SerializedTransaction& txn)
|
||||
|
||||
// Check if destination makes sense.
|
||||
|
||||
if (!uDstAccountID)
|
||||
if (saLimitAmount.isNegative())
|
||||
{
|
||||
Log(lsINFO) << "doCreditSet: Malformed transaction: Negatived credit limit.";
|
||||
|
||||
return temBAD_AMOUNT;
|
||||
}
|
||||
else if (!uDstAccountID)
|
||||
{
|
||||
Log(lsINFO) << "doCreditSet: Malformed transaction: Destination account not specifed.";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user