From e998f106f56349135c584cba4bd3c41d3ed42539 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 12 Nov 2021 15:38:39 -0500 Subject: [PATCH] fix duplicate trending notification to ES --- lbry/wallet/server/block_processor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lbry/wallet/server/block_processor.py b/lbry/wallet/server/block_processor.py index 3005085b58..5895cb44e9 100644 --- a/lbry/wallet/server/block_processor.py +++ b/lbry/wallet/server/block_processor.py @@ -1407,9 +1407,13 @@ def _get_cumulative_update_ops(self, height: int): self.db.prefix_db.effective_amount.stage_put( (name, new_effective_amount, tx_num, position), (touched,) ) - self._add_claim_activation_change_notification( - touched.hex(), height, prev_effective_amount, new_effective_amount - ) + if touched in self.claim_hash_to_txo or touched in self.removed_claim_hashes \ + or touched in self.pending_support_amount_change: + # exclude sending notifications for claims/supports that activated but + # weren't added/spent in this block + self._add_claim_activation_change_notification( + touched.hex(), height, prev_effective_amount, new_effective_amount + ) for channel_hash, count in self.pending_channel_counts.items(): if count != 0: