Documentation ¶
Index ¶
- type InMemoryBlockPersistence
- func (bp *InMemoryBlockPersistence) GetBlock(height primitives.BlockHeight) (*protocol.BlockPairContainer, error)
- 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) GetSyncState() internodesync.SyncState
- 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, primitives.BlockHeight, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemoryBlockPersistence ¶
type InMemoryBlockPersistence struct { Logger log.Logger // contains filtered or unexported fields }
func NewBlockPersistence ¶
func NewBlockPersistence(parent log.Logger, metricFactory metric.Factory, preloadedBlocks ...*protocol.BlockPairContainer) *InMemoryBlockPersistence
func (*InMemoryBlockPersistence) GetBlock ¶ added in v1.3.15
func (bp *InMemoryBlockPersistence) GetBlock(height primitives.BlockHeight) (*protocol.BlockPairContainer, error)
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) GetSyncState ¶ added in v1.3.15
func (bp *InMemoryBlockPersistence) GetSyncState() internodesync.SyncState
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
supports two blockHeight ranges - (1-sequentialTop), (lastWritten-top)
func (*InMemoryBlockPersistence) WriteNextBlock ¶
func (bp *InMemoryBlockPersistence) WriteNextBlock(blockPair *protocol.BlockPairContainer) (bool, primitives.BlockHeight, error)
Click to show internal directories.
Click to hide internal directories.