Page MenuHomePhabricator

[electrum] clarify the concept of number of sigs in a TxInput
ClosedPublic

Authored by PiRK on Sep 14 2023, 07:42.

Details

Summary

The previous num_sig property did not match the coin dict implementation nor its own documentation. The length of the signature list can be more than the required number of signatures for incompletely signed multisig inputs.

Split this into two properties:

  • the number of required signatures
  • the number of provided valid signatures in the signatures list (items that are not None)

The length of the signatures list including None items does not need its own property.

Add a 2-of-3 partially signed transaction test to cover the case for which len(signatures) != num_required_sigs (m != n).

Test Plan

python test_runner.py

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Sep 14 2023, 07:42
PiRK updated this revision to Diff 42188.

remove debugging space

This revision is now accepted and ready to land.Sep 14 2023, 12:53