In ethexe/malachite/service/src/mempool.rs, the mempool insert path calls db.set_injected_transaction(tx) at insert time so the local RPC injected_getTransactions can serve the transaction by hash.
This persists transactions that may never be included or finalized. The DB write should instead happen only after the transaction's MB is finalized.
Task
Move the set_injected_transaction DB write out of the mempool insert path; persist injected transactions only once their MB is finalized.
In
ethexe/malachite/service/src/mempool.rs, the mempool insert path callsdb.set_injected_transaction(tx)at insert time so the local RPCinjected_getTransactionscan serve the transaction by hash.This persists transactions that may never be included or finalized. The DB write should instead happen only after the transaction's MB is finalized.
Task
Move the
set_injected_transactionDB write out of the mempool insert path; persist injected transactions only once their MB is finalized.