fix duplicate trending notification to ES

This commit is contained in:
Jack Robison 2021-11-12 15:38:39 -05:00 committed by Victor Shyba
parent 5e73f82c23
commit efd8fd81ed

View file

@ -1407,9 +1407,13 @@ class BlockProcessor:
self.db.prefix_db.effective_amount.stage_put( self.db.prefix_db.effective_amount.stage_put(
(name, new_effective_amount, tx_num, position), (touched,) (name, new_effective_amount, tx_num, position), (touched,)
) )
self._add_claim_activation_change_notification( if touched in self.claim_hash_to_txo or touched in self.removed_claim_hashes \
touched.hex(), height, prev_effective_amount, new_effective_amount 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(): for channel_hash, count in self.pending_channel_counts.items():
if count != 0: if count != 0: