Documentation ¶
Index ¶
- func NewDposNetwork(cfg NetworkConfig) (*network, error)
- type Arbitrator
- func (a *Arbitrator) GetArbiterPeersInfo() []*dp2p.PeerInfo
- func (a *Arbitrator) OnBlockReceived(b *types.Block, confirmed bool)
- func (a *Arbitrator) OnCipherAddr(pid peer.PID, cipher []byte)
- func (a *Arbitrator) OnConfirmReceived(p *mempool.ConfirmInfo)
- func (a *Arbitrator) OnIllegalBlockTxReceived(p *payload.DPOSIllegalBlocks)
- func (a *Arbitrator) OnInactiveArbitratorsTxReceived(p *payload.InactiveArbitrators)
- func (a *Arbitrator) OnPeersChanged(peers []peer.PID)
- func (a *Arbitrator) OnSidechainIllegalEvidenceReceived(data *payload.SidechainIllegalData)
- func (a *Arbitrator) Start()
- func (a *Arbitrator) Stop() error
- type Config
- type NetworkConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDposNetwork ¶
func NewDposNetwork(cfg NetworkConfig) (*network, error)
Types ¶
type Arbitrator ¶
type Arbitrator struct {
// contains filtered or unexported fields
}
func NewArbitrator ¶
func NewArbitrator(account account.Account, cfg Config) (*Arbitrator, error)
func (*Arbitrator) GetArbiterPeersInfo ¶ added in v0.3.0
func (a *Arbitrator) GetArbiterPeersInfo() []*dp2p.PeerInfo
func (*Arbitrator) OnBlockReceived ¶ added in v0.3.0
func (a *Arbitrator) OnBlockReceived(b *types.Block, confirmed bool)
func (*Arbitrator) OnCipherAddr ¶ added in v0.3.2
func (a *Arbitrator) OnCipherAddr(pid peer.PID, cipher []byte)
OnCipherAddr will be invoked when an address cipher received.
func (*Arbitrator) OnConfirmReceived ¶ added in v0.3.0
func (a *Arbitrator) OnConfirmReceived(p *mempool.ConfirmInfo)
func (*Arbitrator) OnIllegalBlockTxReceived ¶ added in v0.3.0
func (a *Arbitrator) OnIllegalBlockTxReceived(p *payload.DPOSIllegalBlocks)
func (*Arbitrator) OnInactiveArbitratorsTxReceived ¶ added in v0.3.0
func (a *Arbitrator) OnInactiveArbitratorsTxReceived( p *payload.InactiveArbitrators)
func (*Arbitrator) OnPeersChanged ¶ added in v0.3.0
func (a *Arbitrator) OnPeersChanged(peers []peer.PID)
func (*Arbitrator) OnSidechainIllegalEvidenceReceived ¶ added in v0.3.0
func (a *Arbitrator) OnSidechainIllegalEvidenceReceived( data *payload.SidechainIllegalData)
func (*Arbitrator) Start ¶
func (a *Arbitrator) Start()
func (*Arbitrator) Stop ¶
func (a *Arbitrator) Stop() error
type NetworkConfig ¶ added in v0.4.0
type NetworkConfig struct { ChainParams *config.Params Account account.Account MedianTime dtime.MedianTimeSource Listener manager.NetworkEventListener }
Click to show internal directories.
Click to hide internal directories.