Documentation ¶
Index ¶
- func NewBlockPersistence(ctx context.Context, conf config.FilesystemBlockPersistenceConfig, ...) (adapter.BlockPersistence, error)
- type FilesystemBlockPersistence
- func (f *FilesystemBlockPersistence) GetBlockByTx(txHash primitives.Sha256, minBlockTs primitives.TimestampNano, ...) (block *protocol.BlockPairContainer, txIndexInBlock int, err error)
- func (f *FilesystemBlockPersistence) GetBlockTracker() *synchronization.BlockTracker
- func (f *FilesystemBlockPersistence) GetLastBlock() (*protocol.BlockPairContainer, error)
- func (f *FilesystemBlockPersistence) GetLastBlockHeight() (primitives.BlockHeight, error)
- func (f *FilesystemBlockPersistence) GetResultsBlock(height primitives.BlockHeight) (*protocol.ResultsBlockContainer, error)
- func (f *FilesystemBlockPersistence) GetTransactionsBlock(height primitives.BlockHeight) (*protocol.TransactionsBlockContainer, error)
- func (f *FilesystemBlockPersistence) ScanBlocks(from primitives.BlockHeight, pageSize uint8, cursor adapter.CursorFunc) error
- func (f *FilesystemBlockPersistence) WriteNextBlock(blockPair *protocol.BlockPairContainer) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBlockPersistence ¶
func NewBlockPersistence(ctx context.Context, conf config.FilesystemBlockPersistenceConfig, parent log.BasicLogger, metricFactory metric.Factory) (adapter.BlockPersistence, error)
Types ¶
type FilesystemBlockPersistence ¶
type FilesystemBlockPersistence struct {
// contains filtered or unexported fields
}
func (*FilesystemBlockPersistence) GetBlockByTx ¶
func (f *FilesystemBlockPersistence) GetBlockByTx(txHash primitives.Sha256, minBlockTs primitives.TimestampNano, maxBlockTs primitives.TimestampNano) (block *protocol.BlockPairContainer, txIndexInBlock int, err error)
func (*FilesystemBlockPersistence) GetBlockTracker ¶
func (f *FilesystemBlockPersistence) GetBlockTracker() *synchronization.BlockTracker
func (*FilesystemBlockPersistence) GetLastBlock ¶
func (f *FilesystemBlockPersistence) GetLastBlock() (*protocol.BlockPairContainer, error)
func (*FilesystemBlockPersistence) GetLastBlockHeight ¶
func (f *FilesystemBlockPersistence) GetLastBlockHeight() (primitives.BlockHeight, error)
func (*FilesystemBlockPersistence) GetResultsBlock ¶
func (f *FilesystemBlockPersistence) GetResultsBlock(height primitives.BlockHeight) (*protocol.ResultsBlockContainer, error)
func (*FilesystemBlockPersistence) GetTransactionsBlock ¶
func (f *FilesystemBlockPersistence) GetTransactionsBlock(height primitives.BlockHeight) (*protocol.TransactionsBlockContainer, error)
func (*FilesystemBlockPersistence) ScanBlocks ¶
func (f *FilesystemBlockPersistence) ScanBlocks(from primitives.BlockHeight, pageSize uint8, cursor adapter.CursorFunc) error
func (*FilesystemBlockPersistence) WriteNextBlock ¶
func (f *FilesystemBlockPersistence) WriteNextBlock(blockPair *protocol.BlockPairContainer) (bool, error)
Click to show internal directories.
Click to hide internal directories.