The PR is a follow-up to #22543. The helper send_large_txs
in its current interface has a fee_rate parameter, implying that it would create a transaction with exactly that rate. Unfortunately, this fee rate is only passed to MiniWallet’s create_self_transfer
method, which can’t know that we append several tx outputs after, increasing the tx’s vsize and decreasing it’s fee rate accordingly.
In our case, the fee rate is off by several orders of magnitude, as the tx’s vsize changes changes from 96 to 67552 vbytes (>700x), i.e. the value passed to this function is neither really a fee rate nor an absolute fee, but something in-between, which is very confusing. It was suggested to simply in-line this helper as it’s currently only used in this single test (https://github.com/bitcoin/bitcoin/pull/22543#discussion_r701685136, #22543 (comment)), but I could imagine that this helper may also become useful for other tests and may be moved to a library (e.g. wallet.py) in the future.
Clarify the interface by passing an absolute fee that is deducted in the end (and also verified, via testmempoolaccept) and also describe how we come up with the value passed. On master, the comment says that the fee rate needs to increased “massively”; this word is also removed because the fee rate only needs to be higher for the test to succeed.