github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/model/flow/collectionGuarantee.go (about) 1 package flow 2 3 import ( 4 "github.com/onflow/crypto" 5 ) 6 7 // CollectionGuarantee is a signed hash for a collection, which is used 8 // to announce collections to consensus nodes. 9 type CollectionGuarantee struct { 10 CollectionID Identifier // ID of the collection being guaranteed 11 ReferenceBlockID Identifier // defines expiry of the collection 12 ChainID ChainID // the chainID of the cluster in order to determine which cluster this guarantee belongs to 13 SignerIndices []byte // encoded indices of the signers 14 Signature crypto.Signature // guarantor signatures 15 } 16 17 // ID returns the fingerprint of the collection guarantee. 18 func (cg *CollectionGuarantee) ID() Identifier { 19 return cg.CollectionID 20 } 21 22 // Checksum returns a checksum of the collection guarantee including the 23 // signatures. 24 func (cg *CollectionGuarantee) Checksum() Identifier { 25 return MakeID(cg) 26 }