Fixes #24634 by using the testing_setup
’s actual mempool rather than a locally-declared mempool for running check()
.
Also creates a test utility for populating the mempool with a bunch of random transactions. I imagine this could be useful in other places as well; it was necessary here because we needed the mempool to contain transactions spending coins available in the current chainstate. The existing CreateOrderedCoins()
is insufficient because it creates coins out of thin air.
Also implements the separate suggestion to use the TestingSetup
mempool in ComplexMemPool
bench.