chang sfFeeAmount to soeOPTIONAL

This commit is contained in:
tequ
2026-01-30 20:03:24 +09:00
parent 4cd8d0d178
commit 175a2dfd28
2 changed files with 2 additions and 4 deletions

View File

@@ -616,7 +616,7 @@ LEDGER_ENTRY(ltSPONSORSHIP, 0x0090, Sponsorship, sponsorship, ({
{sfPreviousTxnLgrSeq, soeREQUIRED},
{sfOwner, soeREQUIRED},
{sfSponsee, soeREQUIRED},
{sfFeeAmount, soeDEFAULT},
{sfFeeAmount, soeOPTIONAL},
{sfMaxFee, soeOPTIONAL},
{sfReserveCount, soeDEFAULT},
{sfOwnerNode, soeREQUIRED},

View File

@@ -478,9 +478,7 @@ Transactor::payFee()
auto const feeAmountAfter = sle->getFieldAmount(payer.balanceField) - feePaid;
if (feeAmountAfter == beast::zero && payer.balanceField == sfFeeAmount)
// Because ltSponsorship.sfFeeAmount is soeDEFAULT
// TODO: Use whether the field is soeDEFAULT instead of sfFeeAmount in
// the condition.
// Because ltSponsorship.sfFeeAmount is soeOptional
sle->makeFieldAbsent(payer.balanceField);
else
sle->setFieldAmount(payer.balanceField, feeAmountAfter);