From b4e5f35e6624fc5dca5bf6d073880c5b8ce35d71 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 7 Nov 2022 10:39:10 +0100 Subject: [PATCH] trezor: optimize signing speed by not serializing transaction in trezor Since Electrum is not using TxRequestSerializedType.serialized_tx we might ask the device not to serialize transactions by setting SignTx.serialize=False This flag is only present in trezorlib 0.13.4, so only users on that version will benefit from the speedup. However, we decided to keep the minimum required version to 0.13.0, since the newer version is not strictly required. --- electrum/plugins/trezor/trezor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/electrum/plugins/trezor/trezor.py b/electrum/plugins/trezor/trezor.py index d7e165a1e..9dbfd5cac 100644 --- a/electrum/plugins/trezor/trezor.py +++ b/electrum/plugins/trezor/trezor.py @@ -363,6 +363,7 @@ class TrezorPlugin(HW_PluginBase): lock_time=tx.locktime, version=tx.version, amount_unit=self.get_trezor_amount_unit(), + serialize=False, prev_txes=prev_tx) signatures = [(bh2u(x) + '01') for x in signatures] tx.update_signatures(signatures)