Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotOpened indicates db is not opened ErrNotOpened = errors.New("DB is not opened") )
Functions ¶
This section is empty.
Types ¶
type BlockDAO ¶
type BlockDAO interface { Start(ctx context.Context) error Stop(ctx context.Context) error GetBlockHash(uint64) (hash.Hash256, error) GetBlockHeight(hash.Hash256) (uint64, error) GetBlock(hash.Hash256) (*block.Block, error) GetBlockByHeight(uint64) (*block.Block, error) TipHeight() (uint64, error) Header(hash.Hash256) (*block.Header, error) Body(hash.Hash256) (*block.Body, error) GetActionByActionHash(hash.Hash256, uint64) (action.SealedEnvelope, error) GetReceiptByActionHash(hash.Hash256, uint64) (*action.Receipt, error) GetReceipts(uint64) ([]*action.Receipt, error) PutBlock(*block.Block) error DeleteBlockToTarget(uint64) error KVStore() db.KVStore HeaderByHeight(uint64) (*block.Header, error) }
BlockDAO represents the block data access object
func NewBlockDAO ¶
func NewBlockDAO(kvStore db.KVStore, indexers []BlockIndexer, compressBlock bool, cfg config.DB) BlockDAO
NewBlockDAO instantiates a block DAO
Click to show internal directories.
Click to hide internal directories.