diff --git a/src/new_index/schema.rs b/src/new_index/schema.rs index 35e49f8de..8fc35f29a 100644 --- a/src/new_index/schema.rs +++ b/src/new_index/schema.rs @@ -669,6 +669,9 @@ impl ChainQuery { .map(TxHistoryRow::from_row) .filter_map(|history| { self.tx_confirming_block(&history.get_txid()) + // drop history entries that were previously confirmed in a re-orged block and later + // confirmed again at a different height + .filter(|blockid| blockid.height == history.key.confirmed_height as usize) .map(|blockid| (history, blockid)) });