refactor: Retire InnerObjTemplate fix (#7368)

This commit is contained in:
Timothy Banks
2026-07-01 11:36:28 -04:00
committed by GitHub
parent 0d149ba5b6
commit c53aafa6bf
8 changed files with 15 additions and 58 deletions

View File

@@ -738,8 +738,7 @@ AMM::bid(BidArg const& arg)
{
if (auto const amm = env_.current()->read(keylet::amm(asset1_.asset(), asset2_.asset())))
{
if (env_.current()->rules().enabled(fixInnerObjTemplate) &&
!amm->isFieldPresent(sfAuctionSlot))
if (!amm->isFieldPresent(sfAuctionSlot))
Throw<std::runtime_error>("AMM::Bid");
if (amm->isFieldPresent(sfAuctionSlot))
{
@@ -867,8 +866,7 @@ AMM::expectAuctionSlot(auto&& cb) const
{
if (auto const amm = env_.current()->read(keylet::amm(asset1_.asset(), asset2_.asset())))
{
if (env_.current()->rules().enabled(fixInnerObjTemplate) &&
!amm->isFieldPresent(sfAuctionSlot))
if (!amm->isFieldPresent(sfAuctionSlot))
Throw<std::runtime_error>("AMM::expectAuctionSlot");
if (amm->isFieldPresent(sfAuctionSlot))
{
@@ -876,10 +874,6 @@ AMM::expectAuctionSlot(auto&& cb) const
safeDowncast<STObject const&>(amm->peekAtField(sfAuctionSlot));
if (auctionSlot.isFieldPresent(sfAccount))
{
// This could fail in pre-fixInnerObjTemplate tests
// if the submitted transactions recreate one of
// the failure scenarios. Access as optional
// to avoid the failure.
auto const slotFee = auctionSlot[~sfDiscountedFee].value_or(0);
auto const slotInterval = ammAuctionTimeSlot(
env_.app().getTimeKeeper().now().time_since_epoch().count(), auctionSlot);