memstore

package
v0.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store implements the Store interface with an in-memory store.

func New

func New() *Store

New returns a new in-memory Store implementation.

func (*Store) BlockByHeight

func (s *Store) BlockByHeight(blockHeight uint64) (*flowgo.Block, error)

func (*Store) BlockByID

func (s *Store) BlockByID(id flowgo.Identifier) (*flowgo.Block, error)

func (*Store) CollectionByID

func (s *Store) CollectionByID(colID flowgo.Identifier) (flowgo.LightCollection, error)

func (*Store) CommitBlock

func (s *Store) CommitBlock(
	block flowgo.Block,
	collections []*flowgo.LightCollection,
	transactions map[flowgo.Identifier]*flowgo.TransactionBody,
	transactionResults map[flowgo.Identifier]*types.StorableTransactionResult,
	delta delta.Delta,
	events []flowgo.Event,
) error

func (*Store) EventsByHeight

func (s *Store) EventsByHeight(blockHeight uint64, eventType string) ([]flowgo.Event, error)

func (*Store) LatestBlock

func (s *Store) LatestBlock() (flowgo.Block, error)

func (*Store) LedgerViewByHeight

func (s *Store) LedgerViewByHeight(blockHeight uint64) *delta.View

func (*Store) StoreBlock

func (s *Store) StoreBlock(block *flowgo.Block) error

func (*Store) TransactionByID

func (s *Store) TransactionByID(txID flowgo.Identifier) (flowgo.TransactionBody, error)

func (*Store) TransactionResultByID

func (s *Store) TransactionResultByID(txID flowgo.Identifier) (types.StorableTransactionResult, error)

func (*Store) UnsafeInsertLedgerDelta

func (s *Store) UnsafeInsertLedgerDelta(blockHeight uint64, delta delta.Delta) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL