exclude tecINTERNALs from codecov

This commit is contained in:
Mayukha Vadari
2025-08-22 10:41:35 -04:00
parent 11de1418e6
commit 5524610c82

View File

@@ -366,7 +366,7 @@ NFTokenAcceptOffer::preclaim(PreclaimContext const& ctx)
auto const& offer = bo ? bo : so;
if (!offer)
// Purely defensive, should be caught in preflight.
return tecINTERNAL;
return tecINTERNAL; // LCOV_EXCL_LINE
auto const& tokenID = offer->at(sfNFTokenID);
auto const& amount = offer->at(sfAmount);
@@ -409,7 +409,7 @@ NFTokenAcceptOffer::pay(
{
// This should never happen, but it's easy and quick to check.
if (amount < beast::zero)
return tecINTERNAL;
return tecINTERNAL; // LCOV_EXCL_LINE
auto const result = accountSend(view(), from, to, amount, j_);
@@ -438,7 +438,7 @@ NFTokenAcceptOffer::transferNFToken(
auto tokenAndPage = nft::findTokenAndPage(view(), seller, nftokenID);
if (!tokenAndPage)
return tecINTERNAL;
return tecINTERNAL; // LCOV_EXCL_LINE
if (auto const ret = nft::removeToken(
view(), seller, nftokenID, std::move(tokenAndPage->page));
@@ -447,7 +447,7 @@ NFTokenAcceptOffer::transferNFToken(
auto const sleBuyer = view().read(keylet::account(buyer));
if (!sleBuyer)
return tecINTERNAL;
return tecINTERNAL; // LCOV_EXCL_LINE
std::uint32_t const buyerOwnerCountBefore =
sleBuyer->getFieldU32(sfOwnerCount);
@@ -543,9 +543,11 @@ NFTokenAcceptOffer::doApply()
JLOG(j_.trace()) << "Buy offer is expired, deleting: " << bo->key();
if (!nft::deleteTokenOffer(view(), bo))
{
// LCOV_EXCL_START
JLOG(j_.fatal()) << "Unable to delete expired buy offer '"
<< to_string(bo->key()) << "': ignoring";
return tecINTERNAL;
// LCOV_EXCL_STOP
}
foundExpired = true;
bo.reset(); // Clear the pointer since offer is deleted
@@ -557,9 +559,11 @@ NFTokenAcceptOffer::doApply()
<< "Sell offer is expired, deleting: " << so->key();
if (!nft::deleteTokenOffer(view(), so))
{
// LCOV_EXCL_START
JLOG(j_.fatal()) << "Unable to delete expired sell offer '"
<< to_string(so->key()) << "': ignoring";
return tecINTERNAL;
// LCOV_EXCL_STOP
}
foundExpired = true;
so.reset(); // Clear the pointer since offer is deleted
@@ -571,16 +575,20 @@ NFTokenAcceptOffer::doApply()
if (bo && !nft::deleteTokenOffer(view(), bo))
{
// LCOV_EXCL_START
JLOG(j_.fatal()) << "Unable to delete buy offer '"
<< to_string(bo->key()) << "': ignoring";
return tecINTERNAL;
// LCOV_EXCL_STOP
}
if (so && !nft::deleteTokenOffer(view(), so))
{
// LCOV_EXCL_START
JLOG(j_.fatal()) << "Unable to delete sell offer '"
<< to_string(so->key()) << "': ignoring";
return tecINTERNAL;
// LCOV_EXCL_STOP
}
// Bridging two different offers
@@ -651,7 +659,7 @@ NFTokenAcceptOffer::doApply()
if (so)
return acceptOffer(so);
return tecINTERNAL;
return tecINTERNAL; // LCOV_EXCL_LINE
}
} // namespace ripple