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