github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/state/cluster/snapshot.go (about) 1 package cluster 2 3 import ( 4 "github.com/onflow/flow-go/model/flow" 5 ) 6 7 // Snapshot represents an immutable snapshot at a specific point in the cluster 8 // state history. 9 type Snapshot interface { 10 11 // Collection returns the collection generated in this step of the cluster 12 // state history. 13 Collection() (*flow.Collection, error) 14 15 // Head returns the latest block at the selected point of the cluster state 16 // history. If the snapshot was selected by block ID, returns the header 17 // with that block ID. If the snapshot was selected as final, returns the 18 // latest finalized block. 19 Head() (*flow.Header, error) 20 21 // Pending returns all children IDs for the snapshot head, which thus were 22 // potential extensions of the protocol state at this snapshot. The result 23 // is ordered such that parents are included before their children. These 24 // are NOT guaranteed to have been validated by HotStuff. 25 Pending() ([]flow.Identifier, error) 26 }