redundant: you subscribed only to 'updated'
This commit is contained in:
parent
eb6be6d77d
commit
e7e3558fba
@ -797,7 +797,6 @@ class Peer(PrintError):
|
|||||||
assert success
|
assert success
|
||||||
# wait until we see confirmations
|
# wait until we see confirmations
|
||||||
def on_network_update(event, *args):
|
def on_network_update(event, *args):
|
||||||
if event == 'updated':
|
|
||||||
conf = wallet.get_tx_height(funding_txid)[1]
|
conf = wallet.get_tx_height(funding_txid)[1]
|
||||||
if conf >= funding_txn_minimum_depth:
|
if conf >= funding_txn_minimum_depth:
|
||||||
async def set_local_funding_locked_result():
|
async def set_local_funding_locked_result():
|
||||||
@ -809,8 +808,6 @@ class Peer(PrintError):
|
|||||||
self.print_error('local_funding_locked.set_result error for channel {}: {}'.format(channel_id, e))
|
self.print_error('local_funding_locked.set_result error for channel {}: {}'.format(channel_id, e))
|
||||||
asyncio.run_coroutine_threadsafe(set_local_funding_locked_result(), asyncio.get_event_loop())
|
asyncio.run_coroutine_threadsafe(set_local_funding_locked_result(), asyncio.get_event_loop())
|
||||||
self.network.unregister_callback(on_network_update)
|
self.network.unregister_callback(on_network_update)
|
||||||
else:
|
|
||||||
self.print_error("unexpected network message:", event, args)
|
|
||||||
self.network.register_callback(on_network_update, ['updated']) # thread safe
|
self.network.register_callback(on_network_update, ['updated']) # thread safe
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user