Test the ledger interface used by the mempool
We mock the LedgerInterface and in particular getLedgerStateForTxs. It seems we need to add tables to the mempool to exercise the part of the mempool logic that deals with them. Which options do we have?
Option 0: Mock the LedgerInterface with ledger tables. The problem with this is that we'd still need to test mempool implementation.
Option 1: use the actual ledger interface:
chainDBLedgerInterface ::
( IOLike m
, LedgerSupportsMempool blk
)
=> ChainDB m blk -> LedgerInterface m blk
The problem with this is that it requires an actual Chain DB! So this might require significant modifications to the mempool-test code.
First, we need to test the correctness of getLedgerStateForKeys, which is part of the ChainDB API. Why? Because getLedgerStateForTxs relies on this function.
Second, we could use chainDBLedgerInterface if we could find a way to generate arbitrary ChainDB's and add this to TestMempool.
This is on hold because we might do a mempool rewrite instead
This should be fixed by https://github.com/input-output-hk/ouroboros-network/issues/4044
I'm closing this one in favor of #4044