If the added block exceeds the blockfile size in test-only
-fastprune mode, the node would get stuck in an infinite loop and
run out of memory.
Avoid this by raising the blockfile size to the size of the added block
in this situation.
Co-authored-by: TheCharlatan <seb.kung@gmail.com>
This is a backport of core#27191
The `txlist` argument for `blocktools.create_coinbase` should have been added in D10688, but was skipped because it was unused in Bitcoin ABC until now.
Note that this fix does not address the non-test issue of blocks larger than 128 MiB
See: https://gitlab.com/bitcoin-cash-node/bitcoin-cash-node/-/merge_requests/855