domain

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 14 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockByKey

func BlockByKey(height string) ([]byte, []byte)

func DBReset

func DBReset(cfg *infraconfig.Config) bool

func GenesisConsensusDBCreate

func GenesisConsensusDBCreate(gc []byte, db database.Database) bool

func LastBlockRPC

func LastBlockRPC(db database.Database) ([]byte, []byte)

func ReadTx

func ReadTx(m []byte) domaintx

func ReadTxn

func ReadTxn(m []byte) *domaintx

Types

type Domain

type Domain interface {
	Consensus() external.Consensus

	ConsensusEventsChannel() chan external.ConsensusEvent

	MiningManager() miningmanager.MiningManager
}

Domain provides a reference to the domain's external aps

func New

func New(consensusConfig *consensus.Config, mempoolConfig *mempool.Config, db database.Database) (Domain, error)

type Metchain

type Metchain struct {
	Db          database.Database
	Blockheight uint64
	Cdiff       uint64
}

func VerifyGenesisConsensusDB

func VerifyGenesisConsensusDB(gc []byte, db database.Database, cfg *infraconfig.Config) *Metchain

func (*Metchain) Close

func (mc *Metchain) Close() interface{}

func (*Metchain) Delete

func (mc *Metchain) Delete(key *database.Key) interface{}

func (*Metchain) Get

func (mc *Metchain) Get(key *database.Key) ([]byte, interface{})

func (*Metchain) Has

func (mc *Metchain) Has(key *database.Key) (bool, interface{})

func (*Metchain) LastBlock

func (mc *Metchain) LastBlock() ([]byte, []byte)

func (*Metchain) Put

func (mc *Metchain) Put(key *database.Key, value []byte) interface{}

Jump to

Keyboard shortcuts

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