fix: broadcast_transaction from non network thread

This commit is contained in:
ThomasV 2018-09-24 11:44:28 +02:00 committed by SomberNight
parent c4fc26d7b0
commit 4e68befcf8
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9
2 changed files with 2 additions and 2 deletions

View file

@ -463,7 +463,7 @@ class Peer(PrintError):
while True:
self.ping_if_required()
msg = await self.read_message()
await self.process_message(msg)
self.process_message(msg)
def close_and_cleanup(self):
try:

View file

@ -235,7 +235,7 @@ class LNWorker(PrintError):
none_idx = tx._inputs[0]["signatures"].index(None)
tx.add_signature_to_txin(0, none_idx, bh2u(remote_sig))
assert tx.is_complete()
return self.network.broadcast_transaction(tx)
return self.network.broadcast_transaction_from_non_network_thread(tx)
def _get_next_peers_to_try(self) -> Sequence[LNPeerAddr]:
now = time.time()