Documentation
¶
Index ¶
Constants ¶
const ( // MinSystemTxCount is the minimum number of transactions in a system collection with scheduled // transactions enabled. This includes the system chunk and the process callbacks transactions. MinSystemTxCount = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SystemCollection ¶
type SystemCollection struct {
// contains filtered or unexported fields
}
SystemCollection represents a system collection and exposes the transaction bodies of each transaction within the collection.
func DefaultSystemCollection ¶
func DefaultSystemCollection(chainID flow.ChainID, scheduledTransactionsEnabled bool) (*SystemCollection, error)
DefaultSystemCollection returns the default system collection for the given chain ID. This is the system collection that contains only static system transactions, and no scheduled transactions. If scheduled transactions are disabled, the system collection will contain only the system chunk transaction.
No error returns are expected during normal operation.
func NewSystemCollection ¶
func NewSystemCollection(chainID flow.ChainID, events flow.EventsList) (*SystemCollection, error)
NewSystemCollection returns a new system collection for the given chain ID including scheduled transactions for each PendingExecution event contained in the events list.
No error returns are expected during normal operation.
func (*SystemCollection) ByID ¶
func (s *SystemCollection) ByID(id flow.Identifier) (*flow.TransactionBody, bool)
ByID returns the system transaction body by ID. Returns true if the transaction was found in the collection, false otherwise.
func (*SystemCollection) SystemTxID ¶
func (s *SystemCollection) SystemTxID() flow.Identifier
SystemTxID returns the ID of the system transaction. This is the last transaction in the system collection, which is responsible for protocol management.
func (*SystemCollection) Transactions ¶
func (s *SystemCollection) Transactions() []*flow.TransactionBody
Transactions returns the transactions in the system collection.