Documentation ¶
Overview ¶
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
- Copyright (c) IBAX. All rights reserved.
- See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------
Index ¶
- Variables
- func BroadcastNodeConnInfo(tcpAddress string, data []byte, logger *log.Entry) error
- 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 MarshalTxPacket(txes []sqldb.Transaction) ([]byte, error)
- func NormalizeHostAddress(address string, defaultPort int64) (string, error)
- func SendFullBlockToAll(ctx context.Context, hosts []string, block *sqldb.InfoBlock, ...) error
- func SendStopNetwork(addr string, req *network.StopNetworkRequest) error
- func SendTransacitionsToAll(ctx context.Context, hosts []string, txes []sqldb.Transaction) error
- func UpdateMachineStatus(localAddress, tcpAddress string, logger *log.Entry) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
var BytesPool *bytePool
var (
)var ErrorEmptyBlockBody = errors.New("block is empty")
var ErrorWrongSizeBytes = errors.New("wrong size bytes")
Functions ¶
func BroadcastNodeConnInfo ¶
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 MarshalTxPacket ¶
func MarshalTxPacket(txes []sqldb.Transaction) ([]byte, error)
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 ¶
Types ¶
This section is empty.