1
0

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.
This commit is contained in:
Pavol Rusnak
2022-11-07 10:39:10 +01:00
parent acde8cd0b7
commit b4e5f35e66

View File

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