MCPcopy Create free account
hub / github.com/SeismicSystems/summit / update_processed_height

Method update_processed_height

syncer/src/actor.rs:1551–1571  ·  view source on GitHub ↗

Buffers a processed height update in memory and metrics. Does NOT sync to durable storage. Sync metadata after buffered updates to make them durable.

(
        &mut self,
        height: Height,
        resolver: &mut impl Resolver<Key = Request<B::Digest>>,
    )

Source from the content-addressed store, hash-verified

1549 self.finalized_height.set(height.get() as i64);
1550 }
1551 }
1552
1553 true
1554 }
1555
1556 /// Get the latest finalized block information (height and commitment tuple).
1557 async fn get_latest(&mut self) -> Option<(Height, B::Digest)> {
1558 let height = self.finalizations_by_height.last_index()?;
1559 let finalization = self
1560 .get_finalization_by_height(height)
1561 .await
1562 .expect("finalization missing");
1563 Some((height, finalization.proposal.payload))
1564 }
1565
1566 // -------------------- Mixed Storage --------------------
1567
1568 /// Looks for a block anywhere in local storage.
1569 async fn find_block<K: PublicKey>(
1570 &mut self,
1571 buffer: &mut buffered::Mailbox<K, B>,
1572 commitment: B::Digest,
1573 ) -> Option<B> {
1574 // Check buffer.

Callers 1

Calls 3

putMethod · 0.80
getMethod · 0.80
predicateMethod · 0.80

Tested by

no test coverage detected