electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8b61d18a9f252ee69f270c84738dbe82b73b6c31
parent 5d52dc204cc85a6660d2790769ecd7128d228646
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue,  6 Nov 2018 17:04:12 +0100

transaction.serialize_output: use namedtuple fields

Diffstat:
Melectrum/transaction.py | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/electrum/transaction.py b/electrum/transaction.py @@ -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