xmrwallet OpWallet: new main_starts_daemon attr
This commit is contained in:
parent
7d8d9c8f05
commit
720d80c19e
1 changed files with 13 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ class OpWallet(OpBase):
|
|||
start_daemon = True
|
||||
skip_wallet_check = False # for debugging
|
||||
disable_authentication = False
|
||||
main_starts_daemon = False
|
||||
|
||||
def __init__(self, cfg, uarg_tuple):
|
||||
|
||||
|
|
@ -109,8 +110,15 @@ class OpWallet(OpBase):
|
|||
if not self.skip_wallet_check:
|
||||
self.to_process = check_wallets()
|
||||
|
||||
if self.to_process and self.start_daemon and not self.cfg.no_start_wallet_daemon:
|
||||
asyncio.run(self.restart_wallet_daemon())
|
||||
self.need_daemon_start = False
|
||||
if (
|
||||
self.to_process
|
||||
and self.start_daemon
|
||||
and not self.cfg.no_start_wallet_daemon):
|
||||
if self.main_starts_daemon:
|
||||
self.need_daemon_start = True
|
||||
else:
|
||||
asyncio.run(self.restart_wallet_daemon())
|
||||
|
||||
@staticmethod
|
||||
def stat_wallet(fn):
|
||||
|
|
@ -200,6 +208,9 @@ class OpWallet(OpBase):
|
|||
return 'offline signing ' if self.cfg.offline else 'watch-only ' if self.cfg.watch_only else ''
|
||||
|
||||
async def main(self):
|
||||
if self.main_starts_daemon and self.need_daemon_start:
|
||||
await self.restart_wallet_daemon()
|
||||
|
||||
if self.to_process and not self.compat_call:
|
||||
gmsg('\n{a}ing {b} {c}wallet{d}'.format(
|
||||
a = self.stem.capitalize(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue