Documentation
¶
Index ¶
- Constants
- func LoadAllChains(ctx context.Context, cfg config.AppConfig) (map[uint32]*ChainRTO, error)
- func LoadAndInitAllChains(ctx context.Context, cfg config.AppConfig) (map[uint32]*ChainRTO, error)
- func LoadAndInitAllChainsPGOnly(ctx context.Context, cfg config.AppConfig) (map[uint32]*ChainRTO, error)
- func ResetPGIndexerTips(cfg config.AppConfig, chainID int) error
- func UseLogger(logger zerolog.Logger)
- type ChainRTO
- func (chainRT *ChainRTO) BestSnapshot() *chaindata.BestState
- func (chainRT *ChainRTO) BlockTemplate(useCoinbaseValue bool, burnReward int) (chaindata.BlockTemplate, error)
- func (chainRT *ChainRTO) CalcKForHeight(height int32) uint32
- func (chainRT *ChainRTO) Close()
- func (chainRT *ChainRTO) InitBlockchain(beacon *ChainRTO) error
- func (chainRT *ChainRTO) InitLvlDB() error
- func (chainRT *ChainRTO) InitP2P() error
- func (chainRT *ChainRTO) InitPG() error
- func (chainRT *ChainRTO) Repo() *pgdb.ChainDB
- func (chainRT *ChainRTO) ShardCount() (uint32, error)
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 LoadAndInitAllChains ¶
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 NewShardFromLvlDB ¶
func NewShardFromPG ¶
func (*ChainRTO) BestSnapshot ¶
func (*ChainRTO) BlockTemplate ¶
func (*ChainRTO) CalcKForHeight ¶
func (*ChainRTO) InitBlockchain ¶
func (*ChainRTO) ShardCount ¶
Click to show internal directories.
Click to hide internal directories.