Documentation ¶
Index ¶
- Variables
- func ConcatCopyPreAllocate(slices [][]byte) []byte
- func DefaultDataDir() string
- func GetBackend() backend
- func GetTendermintConfig(chainId string, ctx *cli.Context) cfg.Config
- func HomeDir() string
- func New(chainConfig *params.ChainConfig, cliCtx *cli.Context, ...) consensus.Tendermint
- func ProtocolAndAddress(listenAddr string) (string, string)
- func SetEventSwitch(evsw types.EventSwitch, eventables ...types.Eventable)
- type API
- func (api *API) CreateValidator(from common.Address) (*tdmTypes.PrivV, error)
- func (api *API) DecodeExtraData(extra string) (extraApi *tdmTypes.TendermintExtraApi, err error)
- func (api *API) GetBannedList() (*tdmTypes.BannedApi, error)
- func (api *API) GetCandidateList() (*tdmTypes.CandidateApi, error)
- func (api *API) GetConsensusPublicKey(extra string) ([]string, error)
- func (api *API) GetCurrentEpochNumber() (hexutil.Uint64, error)
- func (api *API) GetEpoch(num hexutil.Uint64) (*tdmTypes.EpochApiForConsole, error)
- func (api *API) GetNextEpochValidators() ([]*tdmTypes.EpochValidatorForConsole, error)
- func (api *API) GetNextEpochVote() (*tdmTypes.EpochVotesApiForConsole, error)
- func (api *API) GetValidatorStatus(from common.Address) (*tdmTypes.ValidatorStatus, error)
- func (api *API) GetVoteHash(from common.Address, pubkey crypto.BLSPubKey, amount *hexutil.Big, salt string) common.Hash
- type Config
- type Node
- func (n *Node) ConsensusReactor() *consensus.ConsensusReactor
- func (n *Node) ConsensusState() *consensus.ConsensusState
- func (n *Node) EventSwitch() types.EventSwitch
- func (n *Node) OnStart() error
- func (n *Node) OnStop()
- func (n *Node) PrivValidator() *types.PrivValidator
- func (n *Node) RunForever()
- type ProposerPolicy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // current validator set. ErrUnauthorizedAddress = errors.New("unauthorized address") // ErrStoppedEngine is returned if the engine is stopped ErrStoppedEngine = errors.New("stopped engine") // ErrStartedEngine is returned if the engine is already started ErrStartedEngine = errors.New("started engine") // ErrNoPrivValidator is returned if private validator is not set during the start of the node ErrNoPrivValidator = errors.New("cannot start node without private validator") )
View Source
var ( // So we can control the DefaultDir DataDirFlag = cli.StringFlag{ Name: "datadir", Usage: "Data directory for the databases and keystore", Value: DefaultDataDir(), } // Not exposed by ligochain VerbosityFlag = cli.IntFlag{ Name: "verbosity", Usage: "Verbosity of ligochain", } MonikerFlag = cli.StringFlag{ Name: "moniker", Value: "", Usage: "Node's moniker", } NodeLaddrFlag = cli.StringFlag{ Name: "node_laddr", Value: "tcp://0.0.0.0:46656", Usage: "Node listen address. (0.0.0.0:0 means any interface, any port)", } SeedsFlag = cli.StringFlag{ Name: "seeds", Value: "", Usage: "Comma delimited host:port seed nodes", } FastSyncFlag = cli.BoolFlag{ Name: "fast_sync", Usage: "Fast blockchain syncing", } SkipUpnpFlag = cli.BoolFlag{ Name: "skip_upnp", Usage: "Skip UPNP configuration", } RpcLaddrFlag = cli.StringFlag{ Name: "rpc_laddr", Value: "unix://@ligochainrpcunixsock", Usage: "RPC listen address. Port required", } )
View Source
var DefaultConfig = &Config{ RequestTimeout: 10000, BlockPeriod: 1, ProposerPolicy: RoundRobin, Epoch: 30000, }
Functions ¶
func ConcatCopyPreAllocate ¶
func DefaultDataDir ¶
func DefaultDataDir() string
func GetBackend ¶
func GetBackend() backend
func GetTendermintConfig ¶
func New ¶
func New(chainConfig *params.ChainConfig, cliCtx *cli.Context, privateKey *ecdsa.PrivateKey, cch core.CrossChainHelper) consensus.Tendermint
New creates an Ethereum backend for Tendermint core engine.
func ProtocolAndAddress ¶
func SetEventSwitch ¶
func SetEventSwitch(evsw types.EventSwitch, eventables ...types.Eventable)
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) CreateValidator ¶
CreateValidator
func (*API) DecodeExtraData ¶
func (api *API) DecodeExtraData(extra string) (extraApi *tdmTypes.TendermintExtraApi, err error)
decode extra data
func (*API) GetCandidateList ¶
func (api *API) GetCandidateList() (*tdmTypes.CandidateApi, error)
func (*API) GetConsensusPublicKey ¶
get consensus publickey of the block
func (*API) GetNextEpochValidators ¶
func (api *API) GetNextEpochValidators() ([]*tdmTypes.EpochValidatorForConsole, error)
func (*API) GetNextEpochVote ¶
func (api *API) GetNextEpochVote() (*tdmTypes.EpochVotesApiForConsole, error)
func (*API) GetValidatorStatus ¶
type Config ¶
type Config struct { RequestTimeout uint64 `toml:",omitempty"` BlockPeriod uint64 `toml:",omitempty"` ProposerPolicy ProposerPolicy `toml:",omitempty"` Epoch uint64 `toml:",omitempty"` }
type Node ¶
type Node struct { cmn.BaseService // contains filtered or unexported fields }
func MakeTendermintNode ¶
func MakeTendermintNode(backend *backend, config cfg.Config, chainConfig *params.ChainConfig, cch core.CrossChainHelper) *Node
func NewNodeNotStart ¶
func NewNodeNotStart(backend *backend, config cfg.Config, chainConfig *params.ChainConfig, cch core.CrossChainHelper, genDoc *types.GenesisDoc) *Node
func (*Node) ConsensusReactor ¶
func (n *Node) ConsensusReactor() *consensus.ConsensusReactor
func (*Node) ConsensusState ¶
func (n *Node) ConsensusState() *consensus.ConsensusState
func (*Node) EventSwitch ¶
func (n *Node) EventSwitch() types.EventSwitch
func (*Node) PrivValidator ¶
func (n *Node) PrivValidator() *types.PrivValidator
func (*Node) RunForever ¶
func (n *Node) RunForever()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.