This PR adds multiple mempool tracepoints.
tracepoint | description |
---|---|
mempool:added |
Is called when a transaction enters the mempool |
mempool:removed |
… when a transaction is removed from the mempool |
mempool:replaced |
… when a transaction is replaced in the mempool |
mempool:rejected |
… when a transaction is rejected from entering the mempool |
The tracepoints are further documented in docs/tracing.md
. Usage is demonstrated in the example script contrib/tracing/mempool_monitor.py
. Interface tests are provided in test/functional/interface_usdt_mempool.py
.
The rationale for passing the removal reason as a string instead of numerically is that the benefits of not having to maintain a redundant enum-string mapping seem to outweigh the small cost of string generation. The reject reason is passed as string as well, although in this instance the string does not have to be generated but is readily available.