Skip to content

Commit 85638cb

Browse files
nits
1 parent 5fc286c commit 85638cb

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

indexer/src/lib.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,6 @@ impl<S: Strategy> Indexer<S> {
171171
}
172172
}
173173

174-
/// Resolve canonical chain queries by finalized height/latest, or block
175-
/// fallback queries by digest.
176174
pub fn get_block(&self, query: &str) -> Option<BlockResult> {
177175
let state = self.state.read().unwrap();
178176

@@ -193,8 +191,7 @@ impl<S: Strategy> Indexer<S> {
193191
.map(|f| BlockResult::Finalized(f.clone()))
194192
})
195193
} else if raw.len() == Digest::SIZE {
196-
// Block uploads are keyed by digest and are not restricted
197-
// to the canonical finalized chain.
194+
// Try to parse as digest
198195
let digest = Digest::decode(raw.as_slice()).ok()?;
199196
state
200197
.blocks_by_digest
@@ -208,11 +205,9 @@ impl<S: Strategy> Indexer<S> {
208205
}
209206
}
210207

211-
/// Store a block body for digest lookups used by the backfiller.
212208
pub fn submit_block(&self, block: Block) {
209+
// Store block by digest (no guarantee this is part of the canonical chain)
213210
let mut state = self.state.write().unwrap();
214-
// These uploads are not certificate-bearing; verified certificate data
215-
// still enters through the seed/notarization/finalization endpoints.
216211
state.blocks_by_digest.insert(block.digest(), block);
217212
}
218213

0 commit comments

Comments
 (0)