The subtests in the functional test mempool_package_limits.py all follow the same pattern:
- first, check that the mempool is currently empty
- create and submit certain single txs to the mempool, prepare list of hex transactions
- check that
testmempoolaccepton the package hex fails with a "package-mempool-limits" error on each tx result - after mining a block, check that submitting the package succeeds
Note that steps 1,3,4 are identical for each of the subtests and only step 2 varies, so this might be a nice opportunity to deduplicate code by using a newly introduced decorator which executes the necessary before and after the essential part of the subtest. This also makes it easier to add new subtests without having to copy-paste those parts once again.
In addition, the first commit switches the fee unit from BTC to Satoshis, which allows to get rid of some imports (COIN and Decimal) and a comment for the test_desc_size_limits subtest is fixed (s/25KvB/21KvB/).