Skip to content

Commit

Permalink
add small comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jsdw committed Dec 4, 2023
1 parent 76c4c18 commit 8697d19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions subxt/src/backend/unstable/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ impl<T: Config + Send + Sync + 'static> Backend<T> for UnstableBackend<T> {
if let Poll::Ready(Some(seen_block)) = seen_blocks_sub.poll_next_unpin(cx) {
match seen_block {
SeenBlock::New(block_ref) => {
// Optimization: once we have a `finalized_hash`, we only care about finalized
// block refs now and can avoid bothering to save new blocks.
if finalized_hash.is_none() {
seen_blocks
.insert(block_ref.hash(), (SeenBlockMarker::New, block_ref));
Expand Down

0 comments on commit 8697d19

Please sign in to comment.