Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDAO ¶
type BlockDAO interface { filedao.FileDAO GetActionByActionHash(hash.Hash256, uint64) (action.SealedEnvelope, uint32, error) GetReceiptByActionHash(hash.Hash256, uint64) (*action.Receipt, error) DeleteBlockToTarget(uint64) error }
BlockDAO represents the block data access object
func NewBlockDAO ¶
func NewBlockDAO(indexers []BlockIndexer, cfg db.Config, deser *block.Deserializer) BlockDAO
NewBlockDAO instantiates a block DAO
func NewBlockDAOInMemForTest ¶ added in v1.1.2
func NewBlockDAOInMemForTest(indexers []BlockIndexer) BlockDAO
NewBlockDAOInMemForTest creates a in-memory block DAO for testing
type BlockIndexer ¶ added in v0.11.0
type BlockIndexer interface { Start(ctx context.Context) error Stop(ctx context.Context) error Height() (uint64, error) PutBlock(context.Context, *block.Block) error DeleteTipBlock(context.Context, *block.Block) error }
BlockIndexer defines an interface to accept block to build index
type BlockIndexerChecker ¶ added in v1.8.0
type BlockIndexerChecker struct {
// contains filtered or unexported fields
}
BlockIndexerChecker defines a checker of block indexer
func NewBlockIndexerChecker ¶ added in v1.8.0
func NewBlockIndexerChecker(dao BlockDAO) *BlockIndexerChecker
NewBlockIndexerChecker creates a new block indexer checker
func (*BlockIndexerChecker) CheckIndexer ¶ added in v1.8.0
func (bic *BlockIndexerChecker) CheckIndexer(ctx context.Context, indexer BlockIndexer, targetHeight uint64, progressReporter func(uint64)) error
CheckIndexer checks a block indexer against block dao
type BlockIndexerWithStart ¶ added in v1.11.0
type BlockIndexerWithStart interface { BlockIndexer // StartHeight returns the start height of the indexer StartHeight() uint64 }
BlockIndexerWithStart defines an interface to accept block to build index from a start height
Click to show internal directories.
Click to hide internal directories.