Page MenuHomePhabricator

test: fix misleading fee unit in mempool_limit.py
Needs ReviewPublic

Authored by Fabien on Fri, Jun 28, 14:31.

Details

Reviewers
roqqit
Group Reviewers
Restricted Project
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

Diff Detail

Event Timeline

Fabien requested review of this revision.Fri, Jun 28, 14:31
roqqit requested changes to this revision.Fri, Jun 28, 17:23
roqqit added a subscriber: roqqit.
roqqit added inline comments.
test/functional/mempool_limit.py
37 ↗(On Diff #48407)

From test_framework/messages.py

This revision now requires changes to proceed.Fri, Jun 28, 17:23

Use XEC constant instead of the magic x100