Documentation
¶
Index ¶
- func CheckSpecialOPVoteSig(cmd *types.SpecialOPCmd, pk crypto.PubKey, sigData []byte) error
- func Initialize(tune *AngineTunes)
- func InitializeLog(env, logpath string) *zap.Logger
- func ProtocolAndAddress(listenAddr string) (string, string)
- type Angine
- func (e *Angine) BroadcastTx(tx []byte) error
- func (e *Angine) BroadcastTxCommit(tx []byte) error
- func (e *Angine) CheckSpecialOp(cmd *types.SpecialOPCmd) ([]byte, error)
- func (e *Angine) CollectSpecialVotes(cmd *types.SpecialOPCmd, tx []byte) error
- func (e *Angine) ConnectApp(app types.Application)
- func (e *Angine) DialSeeds(seeds []string)
- func (e *Angine) FlushMempool()
- func (e *Angine) Genesis() *types.GenesisDoc
- func (e *Angine) GetBlacklist() []string
- func (e *Angine) GetBlock(height int) (*types.Block, *types.BlockMeta)
- func (e *Angine) GetConsensusStateInfo() (string, []string)
- func (e *Angine) GetNodeInfo() *p2p.NodeInfo
- func (e *Angine) GetNumPeers() int
- func (e *Angine) GetNumUnconfirmedTxs() int
- func (e *Angine) GetP2PNetInfo() (bool, []string, []*types.Peer)
- func (e *Angine) GetUnconfirmedTxs() []types.Tx
- func (e *Angine) GetValidators() (int, []*types.Validator)
- func (e *Angine) Height() int
- func (e *Angine) IsNodeValidator(pub crypto.PubKey) bool
- func (e *Angine) P2PHost() string
- func (e *Angine) P2PPort() uint16
- func (e *Angine) PrivValidator() *types.PrivValidator
- func (e *Angine) ProcessSpecialOP(tx []byte) error
- func (e *Angine) RecoverFromCrash(appHash []byte, appBlockHeight int) error
- func (e *Angine) RegisterNodeInfo(ni *p2p.NodeInfo)
- func (e *Angine) SetSpecialVoteRPC(f func([]byte, *types.Validator) ([]byte, error))
- func (e *Angine) Start() error
- func (e *Angine) Stop() bool
- type AngineTunes
- type ITxCheck
- type MempoolFilter
- type MockMempool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSpecialOPVoteSig ¶
func Initialize ¶
func Initialize(tune *AngineTunes)
func InitializeLog ¶
func ProtocolAndAddress ¶
Defaults to tcp
Types ¶
type Angine ¶
type Angine struct {
// contains filtered or unexported fields
}
Angine is a high level abstraction of all the state, consensus, mempool blah blah...
func NewAngine ¶
func NewAngine(tune *AngineTunes) *Angine
NewAngine makes and returns a new angine, which can be used directly after being imported
func (*Angine) BroadcastTx ¶
func (*Angine) BroadcastTxCommit ¶
func (*Angine) CheckSpecialOp ¶
func (e *Angine) CheckSpecialOp(cmd *types.SpecialOPCmd) ([]byte, error)
func (*Angine) CollectSpecialVotes ¶
func (e *Angine) CollectSpecialVotes(cmd *types.SpecialOPCmd, tx []byte) error
CollectSpecialVotes returns nil means the vote passed
func (*Angine) ConnectApp ¶
func (e *Angine) ConnectApp(app types.Application)
func (*Angine) FlushMempool ¶
func (e *Angine) FlushMempool()
func (*Angine) Genesis ¶
func (e *Angine) Genesis() *types.GenesisDoc
func (*Angine) GetBlacklist ¶
func (*Angine) GetConsensusStateInfo ¶
func (*Angine) GetNodeInfo ¶
func (*Angine) GetNumPeers ¶
func (*Angine) GetNumUnconfirmedTxs ¶
func (*Angine) GetUnconfirmedTxs ¶
func (*Angine) PrivValidator ¶
func (e *Angine) PrivValidator() *types.PrivValidator
func (*Angine) ProcessSpecialOP ¶
func (*Angine) RecoverFromCrash ¶
Recover world status Replay all blocks after blockHeight and ensure the result matches the current state.
func (*Angine) RegisterNodeInfo ¶
func (*Angine) SetSpecialVoteRPC ¶
type AngineTunes ¶
type MempoolFilter ¶
type MempoolFilter struct {
// contains filtered or unexported fields
}
func NewMempoolFilter ¶
func NewMempoolFilter(f func([]byte) (bool, error)) MempoolFilter
type MockMempool ¶
type MockMempool struct {
}
Updates to the mempool need to be synchronized with committing a block so apps can reset their transient state on Commit
func (MockMempool) Lock ¶
func (m MockMempool) Lock()
func (MockMempool) Unlock ¶
func (m MockMempool) Unlock()
Click to show internal directories.
Click to hide internal directories.