Skip to content

Commit 1c5486b

Browse files
shesekphilippem
authored andcommitted
Update comment to be more accurate
Following Blockstream#174 (comment)
1 parent 72cf6f0 commit 1c5486b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/elements/asset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ fn chain_asset_stats_delta<T>(
531531
.history_iter_scan(b'I', &asset_id.into_inner()[..], start_height)
532532
.map(TxHistoryRow::from_row)
533533
.filter_map(|history| {
534-
// skip over entries that point to non-existing heights (may happen during reorg handling)
534+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
535535
let header = headers.header_by_height(history.key.confirmed_height as usize)?;
536536
Some((history, BlockId::from(header)))
537537
});

src/new_index/schema.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ impl ChainQuery {
647647
Some(_) => 1, // skip the last_seen_txid itself
648648
None => 0,
649649
})
650-
// skip over entries that point to non-existing heights (may happen during reorg handling)
650+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
651651
.filter_map(|(txid, height)| Some((txid, headers.header_by_height(height)?)))
652652
.take(limit);
653653

@@ -679,7 +679,7 @@ impl ChainQuery {
679679
.map(TxHistoryRow::from_row)
680680
.map(|row| (row.get_txid(), row.key.confirmed_height as usize))
681681
.unique()
682-
// skip over entries that point to non-existing heights (may happen during reorg handling)
682+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
683683
.filter_map(|(txid, height)| Some((txid, headers.header_by_height(height)?.into())))
684684
.take(limit)
685685
.collect()
@@ -758,7 +758,7 @@ impl ChainQuery {
758758
let history_iter = self
759759
.history_iter_scan(b'H', scripthash, start_height)
760760
.map(TxHistoryRow::from_row)
761-
// skip over entries that point to non-existing heights (may happen during reorg handling)
761+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
762762
.filter_map(|history| {
763763
let header = headers.header_by_height(history.key.confirmed_height as usize)?;
764764
Some((history, BlockId::from(header)))
@@ -838,7 +838,7 @@ impl ChainQuery {
838838
let history_iter = self
839839
.history_iter_scan(b'H', scripthash, start_height)
840840
.map(TxHistoryRow::from_row)
841-
// skip over entries that point to non-existing heights (may happen during reorg handling)
841+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
842842
.filter_map(|history| {
843843
let header = headers.header_by_height(history.key.confirmed_height as usize)?;
844844
Some((history, BlockId::from(header)))
@@ -1045,7 +1045,7 @@ impl ChainQuery {
10451045
let _timer = self.start_timer("lookup_spend");
10461046
let edge = TxEdgeValue::from_bytes(&self.store.history_db.get(&TxEdgeRow::key(outpoint))?);
10471047
let headers = self.store.indexed_headers.read().unwrap();
1048-
// skip entries that point to non-existing heights (may happen during reorg handling)
1048+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
10491049
let header = headers.header_by_height(edge.spending_height as usize)?;
10501050
Some(SpendingInput {
10511051
txid: deserialize(&edge.spending_txid).expect("failed to parse Txid"),
@@ -1064,7 +1064,7 @@ impl ChainQuery {
10641064
.zip(outpoints)
10651065
.filter_map(|(edge_val, outpoint)| {
10661066
let edge = TxEdgeValue::from_bytes(&edge_val.unwrap()?);
1067-
// skip over entries that point to non-existing heights (may happen during reorg handling)
1067+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
10681068
let header = headers.header_by_height(edge.spending_height as usize)?;
10691069
Some((
10701070
outpoint,
@@ -1083,7 +1083,7 @@ impl ChainQuery {
10831083
let row_value = self.store.history_db.get(&TxConfRow::key(txid))?;
10841084
let height = TxConfRow::height_from_val(&row_value);
10851085
let headers = self.store.indexed_headers.read().unwrap();
1086-
// skip entries that point to non-existing heights (may happen during reorg handling)
1086+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
10871087
Some(headers.header_by_height(height as usize)?.into())
10881088
}
10891089

@@ -1256,7 +1256,7 @@ pub fn lookup_confirmations(
12561256
.zip(txids)
12571257
.filter_map(|(res, txid)| {
12581258
let confirmation_height = u32::from_le_bytes(res.unwrap()?.try_into().unwrap());
1259-
// skip over entries that point to non-existing heights (may happen during reorg handling)
1259+
// skip over entries that point to non-existing heights (may happen while new/reorged blocks are being processed)
12601260
(confirmation_height <= tip_height).then_some((txid, confirmation_height))
12611261
})
12621262
.collect()

0 commit comments

Comments
 (0)