Skip to content

Commit

Permalink
Merge pull request #12 from mempool/fix/address-stats-reorg
Browse files Browse the repository at this point in the history
Fix address stats when reorg-ed and confirmed in different height
  • Loading branch information
wiz authored Jul 13, 2023
2 parents ac8968a + 8ca766e commit 4d8cca9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/new_index/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 4d8cca9

Please sign in to comment.