async def

This commit is contained in:
Lex Berezhny 2019-10-13 21:59:06 -04:00
parent 3d82becadc
commit 9bb0ca2f0d

View file

@ -3375,7 +3375,7 @@ class Daemon(metaclass=JSONRPCServerType):
return maybe_paginate(utxos, utxo_count, page, page_size) return maybe_paginate(utxos, utxo_count, page, page_size)
@requires(WALLET_COMPONENT) @requires(WALLET_COMPONENT)
def jsonrpc_utxo_release(self, account_id=None, wallet_id=None): async def jsonrpc_utxo_release(self, account_id=None, wallet_id=None):
""" """
When spending a UTXO it is locally locked to prevent double spends; When spending a UTXO it is locally locked to prevent double spends;
occasionally this can result in a UTXO being locked which ultimately occasionally this can result in a UTXO being locked which ultimately
@ -3395,10 +3395,10 @@ class Daemon(metaclass=JSONRPCServerType):
""" """
wallet = self.wallet_manager.get_wallet_or_default(wallet_id) wallet = self.wallet_manager.get_wallet_or_default(wallet_id)
if account_id is not None: if account_id is not None:
wallet.get_account_or_error(account_id).release_all_outputs() await wallet.get_account_or_error(account_id).release_all_outputs()
else: else:
for account in wallet.accounts: for account in wallet.accounts:
account.release_all_outputs() await account.release_all_outputs()
BLOB_DOC = """ BLOB_DOC = """
Blob management. Blob management.