electrum

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

commit 15e91169c508f8681fd4b369be8b80ac11d426bf
parent 8f6fc5917a0229d6c436263aa6d0b98de097c3d6
Author: ThomasV <thomasv@electrum.org>
Date:   Thu, 27 Feb 2020 19:51:16 +0100

lnpeer: fix json serialization of funding_inputs

Diffstat:
Melectrum/lnpeer.py | 2+-
Melectrum/transaction.py | 3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py @@ -594,7 +594,7 @@ class Peer(Logger): sweep_address=self.lnworker.sweep_address, lnworker=self.lnworker, initial_feerate=feerate) - chan.storage['funding_inputs'] = [txin.prevout for txin in funding_tx.inputs()] + chan.storage['funding_inputs'] = [txin.prevout.to_json() for txin in funding_tx.inputs()] sig_64, _ = chan.sign_next_commitment() self.temp_id_to_id[temp_channel_id] = channel_id self.send_message("funding_created", diff --git a/electrum/transaction.py b/electrum/transaction.py @@ -180,6 +180,9 @@ class TxOutpoint(NamedTuple): def to_str(self) -> str: return f"{self.txid.hex()}:{self.out_idx}" + def to_json(self) -> str: + return [self.txid.hex(), self.out_idx] + def serialize_to_network(self) -> bytes: return self.txid[::-1] + bfh(int_to_hex(self.out_idx, 4))