Compare commits

...

1 Commits

Author SHA1 Message Date
tequ
ad72a3350b Extract Transactor::finishApply from Transactor::operator()
Pure move of the post-apply pipeline (tec handling, invariants,
balance rewards, weak hooks, commit) into a helper so it can be
invoked more than once. No behaviour change.
2026-09-29 05:38:08 +10:00
2 changed files with 19 additions and 0 deletions

View File

@@ -2050,6 +2050,16 @@ Transactor::operator()()
if (auto stream = j_.trace())
stream << "preclaim result: " << transToken(result);
return finishApply(result, hooksEnabled, aawMap, tsh);
}
ApplyResult
Transactor::finishApply(
TER result,
bool hooksEnabled,
std::map<AccountID, std::set<uint256>>& aawMap,
std::vector<std::pair<AccountID, bool>>& tsh)
{
bool applied = isTesSuccess(result);
auto fee = ctx_.tx.getFieldAmount(sfFee).xrp();

View File

@@ -228,6 +228,15 @@ protected:
// deduced until after apply i.e. pathing
// participants, crossed offers
// The post-apply pipeline of operator(): tec handling (reset),
// invariants, balance rewards, weak hooks and commit.
ApplyResult
finishApply(
TER result,
bool hooksEnabled,
std::map<AccountID, std::set<uint256>>& aawMap,
std::vector<std::pair<AccountID, bool>>& tsh);
///////////////////////////////////////////////////
TER