Revert the use of calculateReserve in xrpLiquid

This commit is contained in:
tequ
2026-01-15 18:48:06 +09:00
parent 52ae31bb17
commit 204138fb0e

View File

@@ -688,10 +688,20 @@ xrpLiquid(
std::uint32_t const ownerCount = confineOwnerCount(
view.ownerCountHook(id, sle->getFieldU32(sfOwnerCount)), ownerCountAdj);
std::size_t sponsoredOwnerCount = sle->getFieldU32(sfSponsoredOwnerCount);
std::size_t sponsoringOwnerCount = sle->getFieldU32(sfSponsoringOwnerCount);
bool isAccountSponsored = sle->isFieldPresent(sfSponsorAccount);
std::size_t sponsoringAccountCount =
sle->getFieldU32(sfSponsoringAccountCount);
// Pseudo-accounts have no reserve requirement
auto const reserve = isPseudoAccount(sle)
? XRPAmount{0}
: calculateReserve(sle, view.fees());
auto const reserve = isPseudoAccount(sle) ? XRPAmount{0}
: view.fees().accountReserve(
ownerCount,
sponsoredOwnerCount,
sponsoringOwnerCount,
isAccountSponsored,
sponsoringAccountCount);
auto const fullBalance = sle->getFieldAmount(sfBalance);