Versions in this module Expand all Collapse all v0 v0.4.2 Mar 6, 2024 v0.4.1 Feb 23, 2024 v0.4.0 Dec 10, 2023 Changes in this version + const LocalTxEvent + const RemoteTxEvent + var ErrorAddTxPool = errors.New("add txpool failed") + var ErrorPreCheck = errors.New("precheck failed") + func NeedChangeEpoch(height uint64, epochInfo *rbft.EpochInfo) bool + type AccountMeta struct + CommitNonce uint64 + PendingNonce uint64 + SimpleTxs []*TxSimpleInfo + TxCount uint64 + Txs []*TxInfo + func AccountMetaFromTxpool(res *txpool.AccountMeta[types.Transaction, *types.Transaction]) *AccountMeta + type BatchSimpleInfo struct + Timestamp int64 + TxCount uint64 + Txs []*TxSimpleInfo + type CommitEvent struct + Block *types.Block + StateUpdatedCheckpoint *consensus.Checkpoint + type Config struct + Applied uint64 + BlockSync block_sync.Sync + Config *repo.ConsensusConfig + ConsensusStorageType string + ConsensusType string + Digest string + EVMConfig repo.EVM + GenesisDigest string + GenesisEpochInfo *rbft.EpochInfo + GetAccountBalance func(address *types.Address) *big.Int + GetAccountNonce func(address *types.Address) uint64 + GetBlockFunc func(height uint64) (*types.Block, error) + GetChainMetaFunc func() *types.ChainMeta + GetCurrentEpochInfoFromEpochMgrContractFunc func() (*rbft.EpochInfo, error) + GetEpochInfoFromEpochMgrContractFunc func(epoch uint64) (*rbft.EpochInfo, error) + Logger logrus.FieldLogger + Network network.Network + PrivKey *ecdsa.PrivateKey + RepoRoot string + SelfAccountAddress string + TxPool txpool.TxPool[types.Transaction, *types.Transaction] + func GenerateConfig(opts ...Option) (*Config, error) + type Logger struct + func (lg *Logger) Critical(v ...any) + func (lg *Logger) Criticalf(format string, v ...any) + func (lg *Logger) Notice(v ...any) + func (lg *Logger) Noticef(format string, v ...any) + func (lg *Logger) Trace(name string, stage string, content any) + type Meta struct + Accounts map[string]*AccountMeta + Batches map[string]*BatchSimpleInfo + MissingBatchTxs map[string]map[uint64]string + ReadyTxCount uint64 + TxCount uint64 + TxCountLimit uint64 + func MetaFromTxpool(res *txpool.Meta[types.Transaction, *types.Transaction]) *Meta + type Option func(*Config) + func WithApplied(height uint64) Option + func WithBlockSync(blockSync block_sync.Sync) Option + func WithConfig(repoRoot string, cfg *repo.ConsensusConfig) Option + func WithConsensusStorageType(consensusStorageType string) Option + func WithConsensusType(typ string) Option + func WithDigest(digest string) Option + func WithEVMConfig(c repo.EVM) Option + func WithGenesisDigest(digest string) Option + func WithGenesisEpochInfo(genesisEpochInfo *rbft.EpochInfo) Option + func WithGetAccountBalanceFunc(f func(address *types.Address) *big.Int) Option + func WithGetAccountNonceFunc(f func(address *types.Address) uint64) Option + func WithGetBlockFunc(f func(height uint64) (*types.Block, error)) Option + func WithGetChainMetaFunc(f func() *types.ChainMeta) Option + func WithGetCurrentEpochInfoFromEpochMgrContractFunc(f func() (*rbft.EpochInfo, error)) Option + func WithGetEpochInfoFromEpochMgrContractFunc(f func(epoch uint64) (*rbft.EpochInfo, error)) Option + func WithLogger(logger logrus.FieldLogger) Option + func WithNetwork(net network.Network) Option + func WithPrivKey(privKey *ecdsa.PrivateKey) Option + func WithSelfAccountAddress(selfAccountAddress string) Option + func WithTxPool(tp txpool.TxPool[types.Transaction, *types.Transaction]) Option + type TxInfo struct + ArrivedTime int64 + LifeTime int64 + Local bool + Tx *types.Transaction + type TxResp struct + ErrorMsg string + Status bool + type TxSimpleInfo struct + ArrivedTime int64 + Hash string + LifeTime int64 + Local bool + Nonce uint64 + Size int + type TxWithResp struct + CheckCh chan *TxResp + PoolCh chan *TxResp + Tx *types.Transaction + type UncheckedTxEvent struct + Event any + EventType int v0.0.0-release-2024-04-01-rc1 Apr 2, 2024