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

Method new

types/src/checkpoint.rs:26–32  ·  view source on GitHub ↗
(state: &ConsensusState)

Source from the content-addressed store, hash-verified

24pub struct Checkpoint {
25 pub data: Bytes,
26 pub digest: Digest,
27}
28
29impl Checkpoint {
30 pub fn new(state: &ConsensusState) -> Self {
31 let data = state.encode();
32 let digest = Sha256::hash(&[&data]);
33 Self { data, digest }
34 }
35}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected