cache

package
v0.0.0-...-8cfcfd0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBCache

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

增加一个缓存层

func New

func New(filepath string) *DBCache

func (*DBCache) GetAccountByID

func (dbc *DBCache) GetAccountByID(id string) (*model.Account, error)

func (*DBCache) GetBlockByID

func (dbc *DBCache) GetBlockByID(id string) (*model.PbftBlock, error)

func (*DBCache) GetBlockByNum

func (dbc *DBCache) GetBlockByNum(num uint64) (*model.PbftBlock, error)

func (*DBCache) GetBlockMeta

func (dbc *DBCache) GetBlockMeta() (*model.BlockMeta, error)

func (*DBCache) GetGenesisBlock

func (dbc *DBCache) GetGenesisBlock() (*model.Genesis, error)

func (*DBCache) GetTxByID

func (dbc *DBCache) GetTxByID(id string) (*model.Tx, error)

func (*DBCache) GetTxReceiptByID

func (dbc *DBCache) GetTxReceiptByID(id string) (*model.TxReceipt, error)

func (*DBCache) Insert

func (dbc *DBCache) Insert(value interface{}) error

func (*DBCache) SetGenesisBlock

func (dbc *DBCache) SetGenesisBlock(genesis *model.Genesis) error

Jump to

Keyboard shortcuts

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