Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //ErrInvalidateRestoreBlocks invalidate restore blocks ErrInvalidateRestoreBlocks = errors.New("invalidate restore blocks") //ErrConfigBlockArchive config block do not need archive ErrConfigBlockArchive = errors.New("config block do not need archive") //ErrArchivedTx archived transaction ErrArchivedTx = errors.New("archived transaction") //ErrArchivedRWSet archived RWSet ErrArchivedRWSet = errors.New("archived RWSet") //ErrArchivedBlock archived block ErrArchivedBlock = errors.New("archived block") )
Functions ¶
This section is empty.
Types ¶
type ArchiveMgr ¶
ArchiveMgr provide handle to archive instances
@Description:
func NewArchiveMgr ¶
func NewArchiveMgr(chainId string, blockDB blockdb.BlockDB, resultDB resultdb.ResultDB, storeConfig *conf.StorageConfig, logger protocol.Logger) (*ArchiveMgr, error)
NewArchiveMgr construct a new `ArchiveMgr` with given chainId
@Description: @param chainId @param blockDB @param resultDB @param storeConfig @param logger @return *ArchiveMgr @return error
func (*ArchiveMgr) ArchiveBlock ¶
func (mgr *ArchiveMgr) ArchiveBlock(archiveHeight uint64) error
ArchiveBlock cache a block with given block height and update batch
@Description: @receiver mgr @param archiveHeight @return error
func (*ArchiveMgr) GetArchivedPivot ¶
func (mgr *ArchiveMgr) GetArchivedPivot() (uint64, error)
GetArchivedPivot return restore block pivot
@Description: @receiver mgr @return uint64 @return error
func (*ArchiveMgr) GetMinUnArchiveBlockSize ¶
func (mgr *ArchiveMgr) GetMinUnArchiveBlockSize() uint64
GetMinUnArchiveBlockSize return unarchiveBlockHeight
@Description: @receiver mgr @return uint64
func (*ArchiveMgr) RestoreBlock ¶
func (mgr *ArchiveMgr) RestoreBlock(blockInfos []*serialization.BlockWithSerializedInfo) error
RestoreBlock restore block from outside block data
@Description: @receiver mgr @param blockInfos @return error
Click to show internal directories.
Click to hide internal directories.