Documentation ¶
Index ¶
- type Config
- type Synchronizer
- func (sync *Synchronizer) HandleBlock(peer *peer.Peer, message *network.BlockMessage)
- func (sync *Synchronizer) HandleBlockInvVect(peer *peer.Peer, invVect *network.InvVect) error
- func (sync *Synchronizer) HandleDisconnectedPeer(peer *peer.Peer)
- func (sync *Synchronizer) HandleReadyPeer(peer *peer.Peer)
- func (sync *Synchronizer) OnPoppedBlock(block *blockchain.Block) error
- func (sync *Synchronizer) OnPushedBlock(block *blockchain.Block) error
- func (sync *Synchronizer) ProcessBlock(message *network.BlockMessage)
- func (sync *Synchronizer) Start() error
- func (sync *Synchronizer) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Synchronizer ¶
type Synchronizer struct {
// contains filtered or unexported fields
}
func NewSynchronizer ¶
func NewSynchronizer(config *Config, blockchain *blockchain.Blockchain, mempool *mempool.Mempool) *Synchronizer
func (*Synchronizer) HandleBlock ¶
func (sync *Synchronizer) HandleBlock(peer *peer.Peer, message *network.BlockMessage)
func (*Synchronizer) HandleBlockInvVect ¶
func (*Synchronizer) HandleDisconnectedPeer ¶
func (sync *Synchronizer) HandleDisconnectedPeer(peer *peer.Peer)
func (*Synchronizer) HandleReadyPeer ¶
func (sync *Synchronizer) HandleReadyPeer(peer *peer.Peer)
func (*Synchronizer) OnPoppedBlock ¶
func (sync *Synchronizer) OnPoppedBlock(block *blockchain.Block) error
func (*Synchronizer) OnPushedBlock ¶
func (sync *Synchronizer) OnPushedBlock(block *blockchain.Block) error
func (*Synchronizer) ProcessBlock ¶
func (sync *Synchronizer) ProcessBlock(message *network.BlockMessage)
func (*Synchronizer) Start ¶
func (sync *Synchronizer) Start() error
func (*Synchronizer) Stop ¶
func (sync *Synchronizer) Stop() error
Click to show internal directories.
Click to hide internal directories.