mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 20:15:51 +00:00
Add checking for invalid offers in ledger.
This commit is contained in:
@@ -152,6 +152,14 @@ TER OfferCreateTransactor::takeOffers(
|
||||
|
||||
usOfferUnfundedFound.insert(uOfferIndex);
|
||||
}
|
||||
else if (!saOfferGets.isPositive() || !saOfferPays.isPositive())
|
||||
{
|
||||
// Offer has bad amounts. Consider offer expired. Delete it.
|
||||
cLog(lsWARNING) << boost::str(boost::format("takeOffers: BAD OFFER: saOfferPays=%s saOfferGets=%s")
|
||||
% saOfferPays % saOfferGets);
|
||||
|
||||
usOfferUnfundedFound.insert(uOfferIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get offer funds available.
|
||||
|
||||
Reference in New Issue
Block a user