Page MenuHomePhabricator

[electrum] remove uneccessary hex <--> bytes conversions in bitcoin.py
ClosedPublic

Authored by PiRK on Sep 11 2023, 07:06.

Details

Summary

These functions all return bytes, so make them work with bytes directly rather than converting integers to strings then converting them to bytes.
It improves code readability and performance.

Depends on D14462

Test Plan

python test_runner.py

I ensured every single line touched by this diff is covered by tests by introducing errors and making sure it causes failures and errors.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
int_to_hex
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24983
Build 49554: Build Diffelectrum-tests
Build 49553: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Sep 11 2023, 07:06
PiRK edited the summary of this revision. (Show Details)

revert unrelated change

This revision is now accepted and ready to land.Sep 11 2023, 08:27