db

package
v1.0.0-tan Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB implement dexon-consensus BlockDatabase interface.

func NewDatabase

func NewDatabase(db ethdb.Database) *DB

func (*DB) Close

func (d *DB) Close() error

func (*DB) GetAllBlocks

func (d *DB) GetAllBlocks() (coreDb.BlockIterator, error)

func (*DB) GetBlock

func (d *DB) GetBlock(hash coreCommon.Hash) (coreTypes.Block, error)

func (*DB) GetCompactionChainTipInfo

func (d *DB) GetCompactionChainTipInfo() (hash coreCommon.Hash, height uint64)

func (*DB) GetDKGPrivateKey

func (d *DB) GetDKGPrivateKey(round, reset uint64) (coreDKG.PrivateKey, error)

func (*DB) GetDKGProtocol

func (d *DB) GetDKGProtocol() (
	protocol coreDb.DKGProtocolInfo, err error)

func (*DB) HasBlock

func (d *DB) HasBlock(hash coreCommon.Hash) bool

func (*DB) PutBlock

func (d *DB) PutBlock(block coreTypes.Block) error

func (*DB) PutCompactionChainTipInfo

func (d *DB) PutCompactionChainTipInfo(hash coreCommon.Hash, height uint64) error

func (*DB) PutDKGPrivateKey

func (d *DB) PutDKGPrivateKey(round, reset uint64, key coreDKG.PrivateKey) error

func (*DB) PutOrUpdateDKGProtocol

func (d *DB) PutOrUpdateDKGProtocol(
	protocol coreDb.DKGProtocolInfo) error

func (*DB) UpdateBlock

func (d *DB) UpdateBlock(block coreTypes.Block) error

Jump to

Keyboard shortcuts

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