Versions in this module Expand all Collapse all v1 v1.0.0 Apr 12, 2019 Changes in this version + var GenesisSetUp bool + func IsSetUpGenesis() bool + type BftChainState interface + SaveBftBlock func(block model.AbstractBlock, seenCommits []model.AbstractVerification) error + type CacheChainState struct + func NewCacheChainState(cs *chain_state.ChainState) (*CacheChainState, error) + func (chain *CacheChainState) CurrentBlock() model.AbstractBlock + func (chain *CacheChainState) Genesis() model.AbstractBlock + func (chain *CacheChainState) GetBlock(hash common.Hash, number uint64) model.AbstractBlock + func (chain *CacheChainState) GetBlockByHash(hash common.Hash) model.AbstractBlock + func (chain *CacheChainState) GetBlockNumber(hash common.Hash) *uint64 + func (chain *CacheChainState) GetBody(hash common.Hash) model.AbstractBody + func (chain *CacheChainState) GetBodyRLP(hash common.Hash) rlp.RawValue + func (chain *CacheChainState) GetHeader(hash common.Hash, number uint64) model.AbstractHeader + func (chain *CacheChainState) GetSlot(block model.AbstractBlock) *uint64 + func (chain *CacheChainState) GetSlotByNum(num uint64) *uint64 + func (chain *CacheChainState) GetVerifiers(slot uint64) []common.Address + func (chain *CacheChainState) HasBlock(hash common.Hash, number uint64) bool + func (chain *CacheChainState) HasHeader(hash common.Hash, number uint64) bool + func (chain *CacheChainState) Rollback(target uint64) error + func (chain *CacheChainState) SaveBftBlock(block model.AbstractBlock, seenCommits []model.AbstractVerification) error + type CacheDB interface + GetSeenCommits func(blockHeight uint64, blockHash common.Hash) (result []model.AbstractVerification, err error) + SaveSeenCommits func(blockHeight uint64, blockHash common.Hash, ...) error + type Chain interface + type ChainHelper interface + GetChainConfig func() *chain_config.ChainConfig + GetChainDB func() chaindb.Database + GetEconomyModel func() economy_model.EconomyModel + type CsChainService struct + FutureBlocks *lru.Cache + Quit chan struct{} + func NewCsChainService(config *CsChainServiceConfig, cs *chain_state.ChainState) *CsChainService + func (cs *CsChainService) CurrentBalance(address common.Address) *big.Int + func (cs *CsChainService) GetSeenCommit(height uint64) []model.AbstractVerification + func (cs *CsChainService) GetTransactionNonce(addr common.Address) (nonce uint64, err error) + func (cs *CsChainService) InitService() error + func (cs *CsChainService) SaveBlock(block model.AbstractBlock, seenCommits []model.AbstractVerification) error + func (cs *CsChainService) Stop() + type CsChainServiceConfig struct + CacheDB CacheDB + TxPool TxPool + type StateHelper interface + BuildStateProcessor func(preAccountStateRoot common.Hash) (*state_processor.AccountStateDB, error) + CurrentState func() (*state_processor.AccountStateDB, error) + GetStateStorage func() state_processor.StateStorage + StateAtByBlockNumber func(num uint64) (*state_processor.AccountStateDB, error) + StateAtByStateRoot func(root common.Hash) (*state_processor.AccountStateDB, error) + type StateReader interface + BlockProcessor func(root common.Hash) (*chain.BlockProcessor, error) + BlockProcessorByNumber func(num uint64) (*chain.BlockProcessor, error) + CurrentBlock func() model.AbstractBlock + CurrentHeader func() model.AbstractHeader + Genesis func() model.AbstractBlock + GetBlock func(hash common.Hash, number uint64) model.AbstractBlock + GetBlockByHash func(hash common.Hash) model.AbstractBlock + GetBlockByNumber func(number uint64) model.AbstractBlock + GetBlockNumber func(hash common.Hash) *uint64 + GetBody func(hash common.Hash) model.AbstractBody + GetBodyRLP func(hash common.Hash) rlp.RawValue + GetHeader func(hash common.Hash, number uint64) model.AbstractHeader + GetHeaderByHash func(hash common.Hash) model.AbstractHeader + GetHeaderByNumber func(number uint64) model.AbstractHeader + GetHeaderRLP func(hash common.Hash) rlp.RawValue + GetLatestNormalBlock func() model.AbstractBlock + GetTransaction func(txHash common.Hash) (model.AbstractTransaction, common.Hash, uint64, uint64) + HasBlock func(hash common.Hash, number uint64) bool + HasHeader func(hash common.Hash, number uint64) bool + type StateWriter interface + Rollback func(target uint64) error + SaveBlock func(block model.AbstractBlock) error + type TxPool interface + Reset func(oldHead, newHead *model.Header) + type VerifierHelper interface + BuildRegisterProcessor func(preRoot common.Hash) (*registerdb.RegisterDB, error) + CurrentSeed func() (common.Hash, uint64) + GetCurrVerifiers func() []common.Address + GetLastChangePoint func(block model.AbstractBlock) *uint64 + GetNextVerifiers func() []common.Address + GetSlot func(block model.AbstractBlock) *uint64 + GetSlotByNum func(num uint64) *uint64 + GetVerifiers func(round uint64) []common.Address + IsChangePoint func(block model.AbstractBlock, isProcessPackageBlock bool) bool + NumBeforeLastBySlot func(slot uint64) *uint64