Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version0 access.Version = 0 Version1 access.Version = 1 )
Variables ¶
View Source
var ChainHeightVersions = map[flow.ChainID]access.HeightVersionMapper{ flow.Testnet: access.NewStaticHeightVersionMapper(map[uint64]access.Version{ 0: Version0, 290050888: Version1, }), flow.Mainnet: access.NewStaticHeightVersionMapper(map[uint64]access.Version{ 0: Version0, 133408444: Version1, }), }
Functions ¶
Types ¶
type Versioned ¶
type Versioned struct {
// contains filtered or unexported fields
}
Versioned is a collection of all versions of the system collections.
This is useful when we want to obtain a system collection by ID but we don't have the block height, so we check all versions of system collection if it matches by ID.
func NewVersioned ¶
func (*Versioned) ByHeight ¶
func (s *Versioned) ByHeight(height uint64) access.SystemCollectionBuilder
ByHeight returns the system collection builder for the given height.
func (*Versioned) SearchAll ¶
func (s *Versioned) SearchAll(id flow.Identifier) (*flow.TransactionBody, bool)
SearchAll searches for a transaction by ID in all versions of the system collections. Returns true if the transaction was found in any of the versions, false otherwise.
This is useful when looking up transactions by ID where the block is not known.
Click to show internal directories.
Click to hide internal directories.