This is part of #27463. It splits off the more trivial changes from #26711 for ease of review, as requested in #26711 (comment).
- Split package sanitization in policy/packages.h into helper functions
- Add some tests for its quirks (https://github.com/bitcoin/bitcoin/pull/26711#discussion_r1340521597)
- Rename
CheckPackage
toIsPackageWellFormed
- Improve the
CreateValidTransaction
unit test utility to:- Configure the target feerate and return the fee paid
- Signal BIP125 on transactions to enable RBF tests
- Allow the specification of multiple inputs and outputs
- Move
CleanupTemporaryCoins
into its own function to be reused later without duplication