Page MenuHomePhabricator

[electrum] convert var_int to return bytes
ClosedPublic

Authored by PiRK on Sep 20 2023, 08:24.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa6316f3726f2: [electrum] convert var_int to return bytes
Summary

Some callsites already expect bytes, and the plan is to eventually only deal with bytes internally.

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 20 2023, 08:24
Fabien added a subscriber: Fabien.
Fabien added inline comments.
electrum/electrumabc/bitcoin.py
388 ↗(On Diff #42285)

is int_to_le_hex still used after this diff ?

This revision is now accepted and ready to land.Sep 20 2023, 09:36
electrum/electrumabc/bitcoin.py
388 ↗(On Diff #42285)

Yes, sadly there is still a lof of hex serialization happening that uses it for fixed length integers (amount, sequence.... in headers, transactions...)

This revision was automatically updated to reflect the committed changes.