[electrum] remove more bytes <--> hex conversions in bitcoin.py
Summary:
This fixes all the code using bfh (bytes.fromhex) to expect bytes and return bytes. These are all low-level functions that should not deal with data encoding and decoding, so let's make it the responsibility of higher-level code to pass the correct type.
Note that there are still remaining functions using bh2u (binascii.hexlify(x).decode("ascii")). I'm leaving these untouched for the moment, to keep this diff manageable.
Depends on D14463
Test Plan:
python test_runner.py
Run the application, open, close and reopen an encrypted wallet to test the encrypt_message function.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14464