From e63c226b7436f146493c576adc02f01634cbf4ac Mon Sep 17 00:00:00 2001 From: junderw Date: Wed, 7 Jun 2023 14:54:55 -0700 Subject: [PATCH] Fix: Address stats were wrong when tx is reorg-ed and confirmed at a different height. --- src/new_index/schema.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/new_index/schema.rs b/src/new_index/schema.rs index 35e49f8d..36cd8109 100644 --- a/src/new_index/schema.rs +++ b/src/new_index/schema.rs @@ -667,6 +667,7 @@ impl ChainQuery { let history_iter = self .history_iter_scan(b'H', scripthash, start_height) .map(TxHistoryRow::from_row) + .unique_by(|th| (th.get_txid(), th.get_funded_outpoint())) .filter_map(|history| { self.tx_confirming_block(&history.get_txid()) .map(|blockid| (history, blockid))