Closed Bronek closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 71.3%. Comparing base (
e3d1bb2
) to head (add69ab
).:exclamation: Current head add69ab differs from pull request most recent head 79dff4b
Please upload reports for the commit 79dff4b to get more accurate results.
I will try to add add unit test for this change, since apparently Application
class is usable in unit tests.
High Level Overview of Change
Add new command line option
trap_tx_hash
to make replaying transactions easierThis new option can be used only if
replay
is also enabled. It takes a transaction hash from the ledger loaded for replay, and will cause a specific line to be hit inTransactor::operator()
, right beforeapply()
.Emit an error if:
replay
uint256
in hex)Context of Change
While replaying specific ledger is relatively easy, things get more difficult if we want to debug a specific transaction within the ledger. There are several options, but all of them are a hassle. Why not just a new option to
rippled
to hit a very specific line of code, right before a specific transaction on the replayed ledger is being applied.This change adds new virtual function
std::optional<uint256> trapTxID() const
toripple::Application
class. This new function is called insideTransactor::operator()
to check if:If both conditions are met,
rippled
will simply logTransaction trapped
followed by a hash. The user can put a breakpoint at this line to break into the debugger.Type of Change
.gitignore
, formatting, dropping support for older tooling)