level

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2019 License: AGPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LevelDatabase

type LevelDatabase struct {
	// contains filtered or unexported fields
}

func NewLevelDatabase

func NewLevelDatabase(ldbReader Reader) *LevelDatabase

func (LevelDatabase) GetBlock

func (l LevelDatabase) GetBlock(blockHash []byte, blockNumber int64) *types.Block

func (LevelDatabase) GetBlockHash

func (l LevelDatabase) GetBlockHash(blockNumber int64) []byte

func (LevelDatabase) GetBlockReceipts

func (l LevelDatabase) GetBlockReceipts(blockHash []byte, blockNumber int64) types.Receipts

func (LevelDatabase) GetHeadBlockNumber

func (l LevelDatabase) GetHeadBlockNumber() int64

type LevelDatabaseReader

type LevelDatabaseReader struct {
	// contains filtered or unexported fields
}

func NewLevelDatabaseReader

func NewLevelDatabaseReader(reader ethdb.Reader) *LevelDatabaseReader

func (*LevelDatabaseReader) GetBlock

func (ldbr *LevelDatabaseReader) GetBlock(hash common.Hash, number uint64) *types.Block

func (*LevelDatabaseReader) GetBlockNumber

func (ldbr *LevelDatabaseReader) GetBlockNumber(hash common.Hash) *uint64

func (*LevelDatabaseReader) GetBlockReceipts

func (ldbr *LevelDatabaseReader) GetBlockReceipts(hash common.Hash, number uint64) types.Receipts

func (*LevelDatabaseReader) GetCanonicalHash

func (ldbr *LevelDatabaseReader) GetCanonicalHash(number uint64) common.Hash

func (*LevelDatabaseReader) GetHeadBlockHash

func (ldbr *LevelDatabaseReader) GetHeadBlockHash() common.Hash

type Reader

type Reader interface {
	GetBlock(hash common.Hash, number uint64) *types.Block
	GetBlockNumber(hash common.Hash) *uint64
	GetBlockReceipts(hash common.Hash, number uint64) types.Receipts
	GetCanonicalHash(number uint64) common.Hash
	GetHeadBlockHash() common.Hash
}

Jump to

Keyboard shortcuts

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