From 1c8f92239d651957af1ca4f2c1dfdbba7a1c5da7 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 6 Jul 2021 17:57:01 -0400 Subject: [PATCH] fix `stream_update` --clear_channel flag --- lbry/extras/daemon/daemon.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lbry/extras/daemon/daemon.py b/lbry/extras/daemon/daemon.py index f2d5e0ef3..d40db5698 100644 --- a/lbry/extras/daemon/daemon.py +++ b/lbry/extras/daemon/daemon.py @@ -3616,7 +3616,7 @@ class Daemon(metaclass=JSONRPCServerType): claim_address = old_txo.get_address(account.ledger) channel = None - if channel_id or channel_name: + if not clear_channel and (channel_id or channel_name): channel = await self.get_channel_or_error( wallet, channel_account_id, channel_id, channel_name, for_signing=True) elif old_txo.claim.is_signed and not clear_channel and not replace: @@ -3646,11 +3646,13 @@ class Daemon(metaclass=JSONRPCServerType): else: claim = Claim.from_bytes(old_txo.claim.to_bytes()) claim.stream.update(file_path=file_path, **kwargs) + if clear_channel: + claim.clear_signature() tx = await Transaction.claim_update( - old_txo, claim, amount, claim_address, funding_accounts, funding_accounts[0], channel + old_txo, claim, amount, claim_address, funding_accounts, funding_accounts[0], + channel if not clear_channel else None ) new_txo = tx.outputs[0] - stream_hash = None if not preview: old_stream = self.file_manager.get_filtered(sd_hash=old_txo.claim.stream.source.sd_hash)