Documentation
¶
Overview ¶
Copyright 2017 Delos Development Foundation and contributors. Licensed under the Apache License, Version 2.0. See the COPYING file at the root of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
Copyright 2017 Delos Development Foundation and contributors. Licensed under the Apache License, Version 2.0. See the COPYING file at the root of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
Copyright 2017 Delos Development Foundation and contributors. Licensed under the Apache License, Version 2.0. See the COPYING file at the root of this distribution or at http://www.apache.org/licenses/LICENSE-2.0
Index ¶
- func CheckSpecialOPVoteSig(cmd *types.SpecialOPCmd, pk crypto.PubKey, sigData []byte) error
- func Initialize(tune *DngineTunes)
- func InitializeLog(env, logpath string) *zap.Logger
- func ProtocolAndAddress(listenAddr string) (string, string)
- type Dngine
- func (e *Dngine) BroadcastTx(tx []byte) error
- func (e *Dngine) BroadcastTxCommit(tx []byte) error
- func (e *Dngine) CheckSpecialOp(cmd *types.SpecialOPCmd) ([]byte, error)
- func (e *Dngine) CollectSpecialVotes(cmd *types.SpecialOPCmd, tx []byte) error
- func (e *Dngine) ConnectApp(app types.Application)
- func (e *Dngine) DialSeeds(seeds []string)
- func (e *Dngine) FlushMempool()
- func (e *Dngine) Genesis() *types.GenesisDoc
- func (e *Dngine) GetBlacklist() []string
- func (e *Dngine) GetBlock(height int) (*types.Block, *types.BlockMeta)
- func (e *Dngine) GetConsensusStateInfo() (string, []string)
- func (e *Dngine) GetNodeInfo() *p2p.NodeInfo
- func (e *Dngine) GetNumPeers() int
- func (e *Dngine) GetNumUnconfirmedTxs() int
- func (e *Dngine) GetP2PNetInfo() (bool, []string, []*types.Peer)
- func (e *Dngine) GetUnconfirmedTxs() []types.Tx
- func (e *Dngine) GetValidators() (int, []*types.Validator)
- func (e *Dngine) Height() int
- func (e *Dngine) IsNodeValidator(pub crypto.PubKey) bool
- func (e *Dngine) P2PHost() string
- func (e *Dngine) P2PPort() uint16
- func (e *Dngine) PrivValidator() *types.PrivValidator
- func (e *Dngine) ProcessSpecialOP(tx []byte) error
- func (e *Dngine) RecoverFromCrash(appHash []byte, appBlockHeight int) error
- func (e *Dngine) RegisterNodeInfo(ni *p2p.NodeInfo)
- func (e *Dngine) SetSpecialVoteRPC(f func([]byte, *types.Validator) ([]byte, error))
- func (e *Dngine) Start() error
- func (e *Dngine) Stop() bool
- type DngineTunes
- type ITxCheck
- type MempoolFilter
- type MockMempool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSpecialOPVoteSig ¶
func Initialize ¶
func Initialize(tune *DngineTunes)
func InitializeLog ¶
func ProtocolAndAddress ¶
Defaults to tcp
Types ¶
type Dngine ¶
type Dngine struct {
// contains filtered or unexported fields
}
Dngine is a high level abstraction of all the state, consensus, mempool blah blah...
func NewDngine ¶
func NewDngine(tune *DngineTunes) *Dngine
NewDngine makes and returns a new dngine, which can be used directly after being imported
func (*Dngine) BroadcastTx ¶
func (*Dngine) BroadcastTxCommit ¶
func (*Dngine) CheckSpecialOp ¶
func (e *Dngine) CheckSpecialOp(cmd *types.SpecialOPCmd) ([]byte, error)
func (*Dngine) CollectSpecialVotes ¶
func (e *Dngine) CollectSpecialVotes(cmd *types.SpecialOPCmd, tx []byte) error
CollectSpecialVotes returns nil means the vote passed
func (*Dngine) ConnectApp ¶
func (e *Dngine) ConnectApp(app types.Application)
func (*Dngine) FlushMempool ¶
func (e *Dngine) FlushMempool()
func (*Dngine) Genesis ¶
func (e *Dngine) Genesis() *types.GenesisDoc
func (*Dngine) GetBlacklist ¶
func (*Dngine) GetConsensusStateInfo ¶
func (*Dngine) GetNodeInfo ¶
func (*Dngine) GetNumPeers ¶
func (*Dngine) GetNumUnconfirmedTxs ¶
func (*Dngine) GetUnconfirmedTxs ¶
func (*Dngine) PrivValidator ¶
func (e *Dngine) PrivValidator() *types.PrivValidator
func (*Dngine) ProcessSpecialOP ¶
func (*Dngine) RecoverFromCrash ¶
Recover world status Replay all blocks after blockHeight and ensure the result matches the current state.
func (*Dngine) RegisterNodeInfo ¶
func (*Dngine) SetSpecialVoteRPC ¶
type DngineTunes ¶
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()