[electrum] store and serialize tx data as bytes
Summary:
This should reduce the memory usage of the application by dividing the size of unserialized transactions by 2, and saves a bytes.fromhex(..) conversion in the deserialization function.
The bytes.fromhex conversion now happens at the I/O layer (opening wallet files, receiving transactions from the network, copy-pasting unsigned hex transactions), where the conversion cost probably does not make a difference as the process is I/O bound.
Depends on D14525
Test Plan:
python test_runner.py
./electrum-abc deserialize 02000000012367ad0da9fb8f8a7e574d55d4eb2dd0fd8ebd58b1c21cfddb9fe5426369082a000000006441761c8b702e06fcb8656cb205454f22efff174e3ae9552c1ee83f7d64e3b0d29fa466c48a82597713fd7a3c03e324855349a76660fa26dfec4922c51ea0f51cb6412102a42cd220e6099d5d678066b81813ae4fdd14b290479962ae5c0af1448113bcb4feffffff030000000000000000066a047370616d05b20100000000001976a9144fe822f96257d66eeb498394ce9a1fbca1323ba088ac10270000000000001976a914b97b77f0a2e0b3161354de723a76d58a974c601988ac00000000
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D14524