Documentation
¶
Index ¶
Constants ¶
View Source
const ( AddNewCorePeer = "addNewCorePeer" GetNewTx = "getNewTx" )
View Source
const ( DurShort = 3 * time.Second DurLong = 10 * time.Second )
View Source
const ( ForceSyncInterval = 10 * time.Second ReconnectInterval = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func GetConnectResult ¶
func GetConnectResult() bool
func SetConnectResult ¶
func SetConnectResult(success bool)
Types ¶
type DialManager ¶
type DialManager struct {
// contains filtered or unexported fields
}
func NewDialManager ¶
func NewDialManager(coreNodeID *p2p.NodeID, coreNodeEndpoint string) *DialManager
type LatestStatus ¶
type LatestStatus struct {
CurHeight uint32
CurHash common.Hash
StaHeight uint32
StaHash common.Hash
}
LatestStatus latest peer's status
type ProtocolHandshake ¶
type ProtocolHandshake struct {
ChainID uint16
GenesisHash common.Hash
NodeVersion uint32
LatestStatus LatestStatus
}
ProtocolHandshake protocol handshake
func (*ProtocolHandshake) Bytes ¶
func (phs *ProtocolHandshake) Bytes() []byte
Bytes object to bytes
type ProtocolManager ¶
type ProtocolManager struct {
// contains filtered or unexported fields
}
func NewProtocolManager ¶
func NewProtocolManager(chainID uint16, coreNodeID *p2p.NodeID, coreNodeEndpoint string, chain coreNetwork.BlockChain) *ProtocolManager
Click to show internal directories.
Click to hide internal directories.