rt

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: ISC Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxOrphanTransactions = config.DefaultMaxOrphanTransactions
	DefaultFreeTxRelayLimit      = config.DefaultFreeTxRelayLimit
	DefaultBlockMinWeight        = config.DefaultBlockMinWeight
	DefaultBlockMaxWeight        = config.DefaultBlockMaxWeight
	DefaultBlockMinSize          = config.DefaultBlockMinSize
	DefaultBlockMaxSize          = config.DefaultBlockMaxSize
	DefaultBlockPrioritySize     = mempool.DefaultBlockPrioritySize
	DefaultMaxPeers              = config.DefaultMaxPeers
)

Variables

This section is empty.

Functions

func LoadAllChains

func LoadAllChains(ctx context.Context, cfg config.AppConfig) (map[uint32]*ChainRTO, error)

func LoadAndInitAllChains

func LoadAndInitAllChains(ctx context.Context, cfg config.AppConfig) (map[uint32]*ChainRTO, error)

func LoadAndInitAllChainsPGOnly

func LoadAndInitAllChainsPGOnly(ctx context.Context, cfg config.AppConfig) (map[uint32]*ChainRTO, error)

func ResetPGIndexerTips

func ResetPGIndexerTips(cfg config.AppConfig, chainID int) error

func UseLogger

func UseLogger(logger zerolog.Logger)

Types

type ChainRTO

type ChainRTO struct {
	Cfg      config.AppConfig
	Info     pgdb.ChainInfo
	Ctx      chainctx.IChainCtx
	Shutdown context.Context

	PG    *bun.DB
	LvlDB database.DB

	BlockChain   *blockchain.BlockChain
	GbtWorkState *mining.GBTWorkState
	TxMemPool    *mempool.TxPool
	P2PServer    *p2p.Server
	SyncManager  *netsync.SyncManager

	MiningAddress jaxutil.Address
	// contains filtered or unexported fields
}

func NewBeaconRTO

func NewBeaconRTO(ctx context.Context, cfg config.AppConfig) *ChainRTO

func NewShardFromLvlDB

func NewShardFromLvlDB(ctx context.Context, cfg config.AppConfig, shardID uint32) (*ChainRTO, error)

func NewShardFromPG

func NewShardFromPG(ctx context.Context, cfg config.AppConfig, shardID uint32) (*ChainRTO, error)

func (*ChainRTO) BestSnapshot

func (chainRT *ChainRTO) BestSnapshot() *chaindata.BestState

func (*ChainRTO) BlockTemplate

func (chainRT *ChainRTO) BlockTemplate(useCoinbaseValue bool, burnReward int) (chaindata.BlockTemplate, error)

func (*ChainRTO) CalcKForHeight

func (chainRT *ChainRTO) CalcKForHeight(height int32) uint32

func (*ChainRTO) Close

func (chainRT *ChainRTO) Close()

func (*ChainRTO) InitBlockchain

func (chainRT *ChainRTO) InitBlockchain(beacon *ChainRTO) error

func (*ChainRTO) InitLvlDB

func (chainRT *ChainRTO) InitLvlDB() error

func (*ChainRTO) InitP2P

func (chainRT *ChainRTO) InitP2P() error

func (*ChainRTO) InitPG

func (chainRT *ChainRTO) InitPG() error

func (*ChainRTO) Repo

func (chainRT *ChainRTO) Repo() *pgdb.ChainDB

func (*ChainRTO) ShardCount

func (chainRT *ChainRTO) ShardCount() (uint32, error)

Jump to

Keyboard shortcuts

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