This extends the testmempoolaccept rpc to run on a vector of transactions. The idea is to keep the current mempool immutable and only keep track of the differences to the underlying mempool.
This is based on the transaction pool layer idea from #13804. Comment from there:
This implements a layer around an immutable tx pool. The layer can be seen as a temporary throw-away shell that provides the same interface as CTxMemPool
. Its primary purpose right now is to be passed into ATMP while testing acceptance of several (potentially depending) transaction and then to be discarded.
One use case could be to determine if smart contracts that are set up with multiple txs would be accepted by current consensus and policy rules.
In the future it could be extended to support recursive wrapping of layers or a way to commit changes that happened in the layer to the underlying pool or layer. Furthermore, it could be extended to be revivable after changes to the underlying layer happened. (As opposed to be single-use)