mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-27 09:00:32 +00:00
clean up
This commit is contained in:
@@ -445,6 +445,12 @@ struct ApplyViewContext
|
||||
ApplyView& view;
|
||||
STTx const& tx;
|
||||
ReserveContext reserveContext;
|
||||
|
||||
static ApplyViewContext
|
||||
makeFromTx(ApplyView& view, STTx const& tx)
|
||||
{
|
||||
return {.view = view, .tx = tx, .reserveContext = ReserveContext::makeFromTx(view, tx)};
|
||||
}
|
||||
};
|
||||
|
||||
namespace directory {
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
getApplyViewContext()
|
||||
{
|
||||
XRPL_ASSERT(view_.has_value(), "Previous view exists");
|
||||
return {.view = *view_, .tx = tx, .reserveContext = ReserveContext::makeFromTx(*view_, tx)};
|
||||
return ApplyViewContext::makeFromTx(*view_, tx);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
@@ -390,10 +390,7 @@ CheckCash::doApply()
|
||||
STAmount const flowDeliver{
|
||||
optDeliverMin ? maxDeliverMin() : ctx_.tx.getFieldAmount(sfAmount)};
|
||||
|
||||
auto applyViewContext = ApplyViewContext(
|
||||
{.view = psb,
|
||||
.tx = ctx_.tx,
|
||||
.reserveContext = ReserveContext::makeFromTx(psb, ctx_.tx)});
|
||||
auto applyViewContext = ApplyViewContext::makeFromTx(psb, ctx_.tx);
|
||||
auto const sponsorSle = applyViewContext.reserveContext.sponsorSle;
|
||||
|
||||
// Check reserve. Return destination account SLE if enough reserve,
|
||||
|
||||
Reference in New Issue
Block a user