Browse Source

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.
patch-4
Pavol Rusnak 2 years ago
parent
commit
b4e5f35e66
No known key found for this signature in database GPG Key ID: 91F3B339B9A02A3D
  1. 1
      electrum/plugins/trezor/trezor.py

1
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)

Loading…
Cancel
Save