Factor out Transactor::trapTransaction (#5087)

This commit is contained in:
Bronek Kozicki
2026-02-20 00:18:34 +09:00
committed by tequ
parent 4b7370c0d2
commit 96ce8c5b74
2 changed files with 11 additions and 1 deletions

View File

@@ -1784,6 +1784,14 @@ Transactor::doAgainAsWeak(
}
}
// The sole purpose of this function is to provide a convenient, named
// location to set a breakpoint, to be used when replaying transactions.
void
Transactor::trapTransaction(uint256 txHash) const
{
JLOG(j_.debug()) << "Transaction trapped: " << txHash;
}
//------------------------------------------------------------------------------
std::pair<TER, bool>
Transactor::operator()()
@@ -1826,7 +1834,7 @@ Transactor::operator()()
if (auto const& trap = ctx_.app.trapTxID();
trap && *trap == ctx_.tx.getTransactionID())
{
JLOG(j_.debug()) << "Transaction trapped: " << *trap;
trapTransaction(*trap);
}
auto result = ctx_.preclaimResult;

View File

@@ -269,6 +269,8 @@ private:
checkSingleSign(PreclaimContext const& ctx);
static NotTEC
checkMultiSign(PreclaimContext const& ctx);
void trapTransaction(uint256) const;
};
/** Performs early sanity checks on the txid */