lnpeer: fix json serialization of funding_inputs
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user