adapter

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockPersistence

type BlockPersistence interface {
	WriteNextBlock(blockPairs *protocol.BlockPairContainer) (bool, error)
	GetLastBlock() (*protocol.BlockPairContainer, error)

	// TODO(v1): this function has a hideous interface
	GetBlocks(first primitives.BlockHeight, last primitives.BlockHeight) (blocks []*protocol.BlockPairContainer, firstReturnedBlockHeight primitives.BlockHeight, lastReturnedBlockHeight primitives.BlockHeight, err error)
	GetNumBlocks() (primitives.BlockHeight, error)

	GetBlockTracker() *synchronization.BlockTracker
	GetTransactionsBlock(height primitives.BlockHeight) (*protocol.TransactionsBlockContainer, error)
	GetResultsBlock(height primitives.BlockHeight) (*protocol.ResultsBlockContainer, error)

	// TODO(v1): kill this function and move its logic into the adapter
	GetBlocksRelevantToTxTimestamp(txTimeStamp primitives.TimestampNano, rules BlockSearchRules) []*protocol.BlockPairContainer
}

type BlockSearchRules

type BlockSearchRules struct {
	StartGraceNano        int64
	EndGraceNano          int64
	TransactionExpireNano int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL