Page MenuHomePhabricator

test: MiniWallet: fix fee calculation for P2PK and check tx size
ClosedPublic

Authored by Fabien on Jul 3 2024, 09:15.

Details

Summary

Backport of core#22089.

Instead of the retry loop to get a fixed DER signature size, we could use the Schnorr signatures which are fixed size.
However the only test that uses the P2PK mode so far is the DER signature test, and using schnorr would invalidate the test.

Test Plan
ninja check-functional

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jul 3 2024, 09:15
PiRK added a subscriber: PiRK.
PiRK added inline comments.
test/functional/test_framework/wallet.py
148–152 ↗(On Diff #48478)

This would look a bit nicer, but on the other hand deviation from the source material can be confusing.
Your call.

This revision is now accepted and ready to land.Jul 3 2024, 09:25
test/functional/test_framework/wallet.py
148–152 ↗(On Diff #48478)

I don't think it's a big win. I would rather remove this code and use schnorr to get fixed size signature with no loop at all