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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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