HomePhabricator

test: fix misleading fee unit in mempool_limit.py

Description

test: fix misleading fee unit in mempool_limit.py

Summary:

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.

Clarify the interface by passing an absolute fee that is deducted in the end
(and verified, via testmempoolaccept) and also describe how we come up with the
value passed.

Backport of core#22972.

Depends on D16386.

Test Plan:

./test/functional/test_runner.py mempool_limit

Reviewers: #bitcoin_abc, roqqit

Reviewed By: roqqit

Subscribers: roqqit

Differential Revision: https://reviews.bitcoinabc.org/D16387

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Sep 14 2021, 13:39
FabienCommitted on Jul 1 2024, 20:06
FabienPushed on Jul 1 2024, 20:06
Reviewer
roqqit
Differential Revision
D16387: test: fix misleading fee unit in mempool_limit.py
Parents
rABC4750d0c5ea14: [Automated] Update electrum checkpoints
Branches
Unknown
Tags
Unknown