Documentation ¶
Index ¶
- func Initialize(tune *Tunes, chainId string)
- func InitializeLog(env, logpath string) *zap.Logger
- func ProtocolAndAddress(listenAddr string) (string, string)
- type Angine
- func (ang *Angine) BeginBlock(block *agtypes.BlockCache, eventFireable events.Fireable, ...)
- func (ang *Angine) BroadcastTx(tx []byte) error
- func (ang *Angine) BroadcastTxCommit(tx []byte) error
- func (ang *Angine) ConnectApp(app agtypes.Application) error
- func (ang *Angine) Destroy()
- func (ang *Angine) DialSeeds(seeds []string) error
- func (ang *Angine) EndBlock(block *agtypes.BlockCache, eventFireable events.Fireable, ...)
- func (ang *Angine) ExecBlock(block *agtypes.BlockCache, eventFireable events.Fireable, ...)
- func (ang *Angine) FlushMempool()
- func (ang *Angine) Genesis() *agtypes.GenesisDoc
- func (ang *Angine) GetBlacklist() []string
- func (ang *Angine) GetBlock(height def.INT) (block *agtypes.BlockCache, meta *pbtypes.BlockMeta, err error)
- func (ang *Angine) GetBlockMeta(height def.INT) (meta *pbtypes.BlockMeta, err error)
- func (ang *Angine) GetConsensusStateInfo() (string, []string)
- func (ang *Angine) GetLatestBlock() (block *agtypes.BlockCache, meta *pbtypes.BlockMeta, err error)
- func (ang *Angine) GetNodeInfo() *p2p.NodeInfo
- func (ang *Angine) GetNonEmptyBlockIterator() *blockchain.NonEmptyBlockIterator
- func (ang *Angine) GetNumPeers() int
- func (ang *Angine) GetNumUnconfirmedTxs() int
- func (ang *Angine) GetP2PNetInfo() (bool, []string, []*agtypes.Peer)
- func (ang *Angine) GetUnconfirmedTxs() []agtypes.Tx
- func (ang *Angine) GetValidators() (def.INT, *agtypes.ValidatorSet)
- func (ang *Angine) Height() def.INT
- func (ang *Angine) InitPlugins()
- func (ang *Angine) IsNodeValidator(pub crypto.PubKey) bool
- func (ang *Angine) NonEmptyHeight() def.INT
- func (ang *Angine) P2PHost() string
- func (ang *Angine) P2PPort() uint16
- func (ang *Angine) PrivValidator() *agtypes.PrivValidator
- func (ang *Angine) Query(queryType byte, load []byte) (interface{}, error)
- func (ang *Angine) RecoverFromCrash(appHash []byte, appBlockHeight def.INT) error
- func (ang *Angine) RegisterNodeInfo(ni *p2p.NodeInfo)
- func (ang *Angine) Start() (err error)
- func (ang *Angine) Stop() bool
- type ITxCheck
- type MempoolFilter
- type MockMempool
- type Tunes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
Initialize generates genesis.json and priv_validator.json automatically. It is usually used with commands like "init" before user put the node into running.
func InitializeLog ¶
func ProtocolAndAddress ¶
ProtocolAndAddress accepts tcp by default
Types ¶
type Angine ¶
Angine is a high level abstraction of all the state, consensus, mempool blah blah...
func NewAngine ¶
NewAngine makes and returns a new angine, which can be used directly after being imported
func (*Angine) BeginBlock ¶
func (ang *Angine) BeginBlock(block *agtypes.BlockCache, eventFireable events.Fireable, blockPartsHeader *pbtypes.PartSetHeader)
func (*Angine) BroadcastTx ¶
func (*Angine) BroadcastTxCommit ¶
func (*Angine) ConnectApp ¶
func (ang *Angine) ConnectApp(app agtypes.Application) error
func (*Angine) Destroy ¶
func (ang *Angine) Destroy()
Destroy is called after something go south while before angine.Start has been called
func (*Angine) EndBlock ¶
func (ang *Angine) EndBlock(block *agtypes.BlockCache, eventFireable events.Fireable, blockPartsHeader *pbtypes.PartSetHeader)
plugins modify changedValidators inplace
func (*Angine) ExecBlock ¶
func (ang *Angine) ExecBlock(block *agtypes.BlockCache, eventFireable events.Fireable, executeResult *agtypes.ExecuteResult)
func (*Angine) FlushMempool ¶
func (ang *Angine) FlushMempool()
func (*Angine) Genesis ¶
func (ang *Angine) Genesis() *agtypes.GenesisDoc
func (*Angine) GetBlacklist ¶
func (*Angine) GetBlockMeta ¶
func (*Angine) GetConsensusStateInfo ¶
func (*Angine) GetLatestBlock ¶
func (*Angine) GetNodeInfo ¶
func (*Angine) GetNonEmptyBlockIterator ¶
func (ang *Angine) GetNonEmptyBlockIterator() *blockchain.NonEmptyBlockIterator
func (*Angine) GetNumPeers ¶
func (*Angine) GetNumUnconfirmedTxs ¶
func (*Angine) GetUnconfirmedTxs ¶
func (*Angine) GetValidators ¶
func (ang *Angine) GetValidators() (def.INT, *agtypes.ValidatorSet)
func (*Angine) InitPlugins ¶
func (ang *Angine) InitPlugins()
func (*Angine) NonEmptyHeight ¶
func (*Angine) PrivValidator ¶
func (ang *Angine) PrivValidator() *agtypes.PrivValidator
func (*Angine) RecoverFromCrash ¶
Recover world status Replay all blocks after blockHeight and ensure the result matches the current state.
func (*Angine) RegisterNodeInfo ¶
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()
Directories ¶
Path | Synopsis |
---|---|
blockchain
Package blockchain is a generated protocol buffer package.
|
Package blockchain is a generated protocol buffer package. |
consensus
Package consensus is a generated protocol buffer package.
|
Package consensus is a generated protocol buffer package. |
events
Package events is a generated protocol buffer package.
|
Package events is a generated protocol buffer package. |
mempool
Package mempool is a generated protocol buffer package.
|
Package mempool is a generated protocol buffer package. |
rpc
Package rpc is a generated protocol buffer package.
|
Package rpc is a generated protocol buffer package. |
state
Package state is a generated protocol buffer package.
|
Package state is a generated protocol buffer package. |
trace
Package trace is a generated protocol buffer package.
|
Package trace is a generated protocol buffer package. |
types
Package types is a generated protocol buffer package.
|
Package types is a generated protocol buffer package. |