package
0.7.2
Repository: https://github.com/dnaproject/dna.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
SPDX-License-Identifier: LGPL-3.0-or-later Copyright 2019 DNA Dev team * Copyright (C) 2018 The ontology Authors * This file is part of The ontology library.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

No description provided by the author
NewBlockSyncMgr return a BlockSyncMgr instance.
NewNodeWeight new a nodeweight.
NewServer return a new p2pserver according to the pubkey.
NewSyncFlightInfo return a new SyncFlightInfo instance.

# Constants

s, Request block timeout time.
s, Request header timeout time.
Cache size of block wait to commit to ledger.
Max error headers/blocks response times, if reaches, delete it.
Number of blocks on flight.
Number of headers on flight.
keep CurrentHeaderHeight - CurrentBlockHeight <= SYNC_MAX_HEADER_FORWARD_SIZE.
Offset of the max height and current height.
Request times of next height block.
for current block height plus next.
Record speed count for accuracy.
Record request time for accuracy.
Init a big speed (100MB/s) for every node in first round.

# Structs

No description provided by the author
BlockInfo is used for saving block information in cache.
BlockSyncMgr is the manager class to deal with block sync.
NodeWeight record some params of node, using for sort.
P2PServer control all network activities.
ReconnectAddrs contain addr need to reconnect.
SyncFlightInfo record the info of fight object(header or block).

# Type aliases

NodeWeights implement sorting.