Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockHashLeastNeighborNumber = 1 BlockHashExpiredSeconds = 60 )
Constant of blockhash sync
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync is the synchronizer of blockchain. It includes requestHandler, heightSync, blockhashSync, blockSync.
func (*Sync) BroadcastBlock ¶
BroadcastBlock will broadcast new block to neighbor nodes.
func (*Sync) BroadcastBlockInfo ¶
BroadcastBlockInfo will broadcast new block information to neighbor nodes.
func (*Sync) IsCatchingUp ¶
IsCatchingUp will return whether it is catching up with other nodes.
func (*Sync) ValidBlock ¶
ValidBlock will return the valid blocks from other nodes. Including passive request and active broadcast.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.