cachedb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCacheDataDecoder

func SetCacheDataDecoder(d CacheDataDecoder)

Types

type BFTCacheDataDecoder

type BFTCacheDataDecoder struct{}

func (*BFTCacheDataDecoder) DecodeSeenCommits

func (d *BFTCacheDataDecoder) DecodeSeenCommits(data []byte) (result []model.AbstractVerification, err error)

type CacheDB

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

func NewCacheDB

func NewCacheDB(db ethdb.Database) *CacheDB

func (*CacheDB) GetSeenCommits

func (cache *CacheDB) GetSeenCommits(blockHeight uint64, blockHash common.Hash) (result []model.AbstractVerification, err error)

hash must be empty, if only use height for tag

func (*CacheDB) SaveSeenCommits

func (cache *CacheDB) SaveSeenCommits(blockHeight uint64, blockHash common.Hash, commits []model.AbstractVerification) error

hash must be empty, if only use height for tag

type CacheDataDecoder

type CacheDataDecoder interface {
	DecodeSeenCommits(data []byte) ([]model.AbstractVerification, error)
}

decode interface data

Jump to

Keyboard shortcuts

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