Documentation ¶
Index ¶
- Variables
- func CheckConfirmation(host string, blockID int64, logger *log.Entry) (hash string)
- func GetBlockBodiesChan(ctx context.Context, src io.ReadCloser, blocksCount int64) (<-chan []byte, <-chan error)
- func GetBlocksBodies(ctx context.Context, host string, blockID int64, reverseOrder bool) (<-chan []byte, error)
- func GetMaxBlockID(host string) (blockID int64, err error)
- func HostWithMaxBlock(ctx context.Context, hosts []string) (bestHost string, maxBlockID int64, err error)
- func NormalizeHostAddress(address string, defaultPort int64) (string, error)
- func SendFullBlockToAll(ctx context.Context, hosts []string, block *model.InfoBlock, ...) error
- func SendStopNetwork(addr string, req *network.StopNetworkRequest) error
- func SendTransacitionsToAll(ctx context.Context, hosts []string, txes []model.Transaction) error
- func SendTransactionsToHost(host string, txes []model.Transaction) error
Constants ¶
This section is empty.
Variables ¶
View Source
var BytesPool *bytePool
View Source
var (
)
View Source
var ErrorEmptyBlockBody = errors.New("block is empty")
View Source
var ErrorWrongSizeBytes = errors.New("wrong size bytes")
Functions ¶
func CheckConfirmation ¶
func GetBlockBodiesChan ¶
func GetBlocksBodies ¶
func GetBlocksBodies(ctx context.Context, host string, blockID int64, reverseOrder bool) (<-chan []byte, error)
GetBlocksBodies send GetBodiesRequest returns channel of binary blocks data
func GetMaxBlockID ¶
func HostWithMaxBlock ¶
func NormalizeHostAddress ¶
NormalizeHostAddress get address. if port not defined returns combined string with ip and defaultPort
func SendFullBlockToAll ¶
func SendStopNetwork ¶
func SendStopNetwork(addr string, req *network.StopNetworkRequest) error
func SendTransacitionsToAll ¶
func SendTransactionsToHost ¶
func SendTransactionsToHost(host string, txes []model.Transaction) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.