diff --git a/include/xrpl/tx/ApplyContext.h b/include/xrpl/tx/ApplyContext.h index e979a5d124..0124096a62 100644 --- a/include/xrpl/tx/ApplyContext.h +++ b/include/xrpl/tx/ApplyContext.h @@ -133,11 +133,6 @@ private: // The ID of the batch transaction we are executing under, if seated. std::optional parentBatchId_; - - // A temporary helper object that passes around ApplyContext info - // Only necessary (for now) because the ApplyContext can't be passed into helpers due to - // levelization - ApplyViewContext viewCtx_; }; } // namespace xrpl diff --git a/src/libxrpl/tx/ApplyContext.cpp b/src/libxrpl/tx/ApplyContext.cpp index af991736dc..93b0d101af 100644 --- a/src/libxrpl/tx/ApplyContext.cpp +++ b/src/libxrpl/tx/ApplyContext.cpp @@ -40,13 +40,12 @@ ApplyContext::ApplyContext( , journal(journal) , base_(base) , flags_(flags) - , view_{std::in_place, &base_, flags_} , parentBatchId_(parentBatchId) - , viewCtx_{.view = *view_, .tx = tx} { XRPL_ASSERT( parentBatchId.has_value() == ((flags_ & TapBatch) == TapBatch), "Parent Batch ID should be set if batch apply flag is set"); + view_.emplace(&base_, flags_); } void