Page MenuHomePhabricator

test: add P2PK support to MiniWallet
ClosedPublic

Authored by Fabien on Tue, Jul 2, 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

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

Event Timeline

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

Skip size check for P2PK

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

Properly use sighash forkid

PiRK added a subscriber: PiRK.
PiRK added inline comments.
test/functional/test_framework/wallet.py
121 ↗(On Diff #48464)

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.Tue, Jul 2, 14:37