Page MenuHomePhabricator

[electrum] fix Transaction.from_io in fusion.util
ClosedPublic

Authored by PiRK on Nov 15 2023, 21:02.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCe11af45c985a: [electrum] fix Transaction.from_io in fusion.util
Summary

This fixes a bug that breaks CashFusion when a round of fusion is starting.
Transaction.from_io now requires a list of TxInputs rather than a list of coin dictionnaries.

Test Plan

python test_runner.py

search for usages of Transaction.from_io, confirm that inputs are all TxInput instances.

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Nov 15 2023, 21:02
electrum/electrumabc_plugins/fusion/tests/test_util.py
38–42 ↗(On Diff #43107)

The components are raw protobuf data.

This revision is now accepted and ready to land.Nov 15 2023, 22:13

Transaction.from_io now requires a list of TxInputs rather than a list of coin dictionnaries.

Is this the only remaining instance of the legacy form being used? Should update test plan to confirm this

Transaction.from_io now requires a list of TxInputs rather than a list of coin dictionnaries.

Is this the only remaining instance of the legacy form being used? Should update test plan to confirm this

To the best of my knowledge, yes, but i also thought so the last time I fixed a similar issue. I plan to work on enabling the mypy linter, which should be able to detect such issues.