chainsynker

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShardData  = "coin-processed-"
	BeaconData = "beacon-processed"
)

Variables

View Source
var Localnode interface {
	OnReceive(msgType int, f func(msg interface{}))
	GetUserDatabase() *leveldb.DB
	GetBlockchain() *blockchain.BlockChain
	OnNewBlockFromParticularHeight(chainID int, blkHeight int64, isFinalized bool, f func(bc *blockchain.BlockChain, h common.Hash, height uint64, chainID int))
	GetShardState(shardID int) (uint64, *common.Hash)
	SyncSpecificShardBlockBytes(shardID int, height uint64, blockHash string) ([]byte, error)
}
View Source
var TransactionStateDB map[byte]*statedb.StateDB

var ShardProcessedState map[byte]uint64

Functions

func InitChainSynker

func InitChainSynker(cfg shared.Config)

func OnNewShardBlock

func OnNewShardBlock(bc *blockchain.BlockChain, h common.Hash, height uint64, chainID int)

func ResetMongoAndReSync

func ResetMongoAndReSync() error

Types

type ChainSyncState added in v1.8.0

type ChainSyncState struct {
	BlockProcessed map[int]uint64
	// contains filtered or unexported fields
}

type IncPdexState added in v1.8.0

type IncPdexState struct {
	StakingPools map[string]*pdex.StakingPoolState
	PoolPairs    map[string]*pdex.PoolPairState
	Param        *statedb.Pdexv3Params
}

Jump to

Keyboard shortcuts

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