Page MenuHomePhabricator

test: add P2PK support to MiniWallet
ClosedPublic

Authored by Fabien on Jul 2 2024, 12:12.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC185f0b1bcfac: test: add P2PK support to MiniWallet
Summary
This PR adds support for creating and spending transactions with raw pubkey (P2PK) outputs to MiniWallet

Backport of core#21945.
Only the changes to wallet.py are ported because we don't need it for feature_csv_activation.py.

Depends on D16405.

Test Plan
ninja check-functional

Diff Detail

Event Timeline

Fabien requested review of this revision.Jul 2 2024, 12:12

Skip size check for P2PK

Fabien planned changes to this revision.Jul 2 2024, 12:45

Properly use sighash forkid

PiRK added a subscriber: PiRK.
PiRK added inline comments.
test/functional/test_framework/wallet.py
121

I'm not sure why the bytearray is used here. It is probably not necessary. But it does not hurt either, afaict

$ python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> bytes([0, 1])
b'\x00\x01'
>>> bytes(bytearray([0, 1]))
b'\x00\x01'
>>>
>>> bytes(bytearray([0]))
b'\x00'
>>> bytes([0])
b'\x00'
This revision is now accepted and ready to land.Jul 2 2024, 14:37