From 65a18e78ddede76513b111741cbcc01abace3fc5 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 17 Oct 2019 13:01:02 -0400 Subject: [PATCH] publish checks all accounts before forwarding to stream_create/stream_update --- lbry/lbry/extras/daemon/Daemon.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lbry/lbry/extras/daemon/Daemon.py b/lbry/lbry/extras/daemon/Daemon.py index a987e90c4..bd32db9fe 100644 --- a/lbry/lbry/extras/daemon/Daemon.py +++ b/lbry/lbry/extras/daemon/Daemon.py @@ -2640,8 +2640,13 @@ class Daemon(metaclass=JSONRPCServerType): log.info("publishing: name: %s params: %s", name, kwargs) self.valid_stream_name_or_error(name) wallet = self.wallet_manager.get_wallet_or_default(kwargs.get('wallet_id')) - account = wallet.get_account_or_default(kwargs.get('account_id')) - claims = await account.get_claims(claim_name=name) + if kwargs.get('account_id'): + accounts = [wallet.get_account_or_error(kwargs.get('account_id'))] + else: + accounts = wallet.accounts + claims = await self.ledger.get_claims( + wallet=wallet, accounts=accounts, claim_name=name + ) if len(claims) == 0: if 'bid' not in kwargs: raise Exception("'bid' is a required argument for new publishes.")