ttransaction.serialize_output: use namedtuple fields - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 8b61d18a9f252ee69f270c84738dbe82b73b6c31 DIR parent 5d52dc204cc85a6660d2790769ecd7128d228646 HTML Author: SomberNight <somber.night@protonmail.com> Date: Tue, 6 Nov 2018 17:04:12 +0100 ttransaction.serialize_output: use namedtuple fields Diffstat: M electrum/transaction.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- DIR diff --git a/electrum/transaction.py b/electrum/transaction.py t@@ -1026,10 +1026,9 @@ class Transaction: if outputs: self._outputs.sort(key = lambda o: (o.value, self.pay_script(o.type, o.address))) - def serialize_output(self, output): - output_type, addr, amount = output - s = int_to_hex(amount, 8) - script = self.pay_script(output_type, addr) + def serialize_output(self, output: TxOutput) -> str: + s = int_to_hex(output.value, 8) + script = self.pay_script(output.type, output.address) s += var_int(len(script)//2) s += script return s