mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 07:10:53 +00:00
refactor: Retire InnerObjTemplate fix (#7368)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user