Versions in this module Expand all Collapse all v1 v1.0.2 Aug 16, 2022 v1.0.1 Aug 8, 2022 Changes in this version + func DotToDash(ip string) string + func GetDefaultDomainFromIP(hostname string, domainTemplate string) (string, error) + func MakeSigChainTransaction(wallet *vault.Wallet, sigChain []byte) (*transaction.Transaction, error) + func NewBacktrackSigChainMessage(sigChainElems []*pb.SigChainElem, hash []byte) (*pb.UnsignedMessage, error) + func NewGetBlockHeadersMessage(startHeight, endHeight uint32) (*pb.UnsignedMessage, error) + func NewGetBlockHeadersReply(headers []*block.Header) (*pb.UnsignedMessage, error) + func NewGetBlocksMessage(startHeight, endHeight uint32) (*pb.UnsignedMessage, error) + func NewGetBlocksReply(blocks []*block.Block) (*pb.UnsignedMessage, error) + func NewGetStateMessage(hashes []common.Uint256) (*pb.UnsignedMessage, error) + func NewGetStatesReply(nodes [][]byte) (*pb.UnsignedMessage, error) + func NewIHaveSignatureChainTransactionMessage(height uint32, sigHash []byte) (*pb.UnsignedMessage, error) + func NewPinSigChainMessage(hash []byte) (*pb.UnsignedMessage, error) + func NewRelayMessage(srcIdentifier string, srcPubkey, destID, payload, blockHash, lastHash []byte, ...) (*pb.UnsignedMessage, error) + func NewRequestSignatureChainTransactionMessage(sigHash []byte) (*pb.UnsignedMessage, error) + func NewRequestSignatureChainTransactionReply(transaction *transaction.Transaction) (*pb.UnsignedMessage, error) + func NewTransactionsMessage(transactions []*transaction.Transaction) (*pb.UnsignedMessage, error) + func ShouldRejectAddr(localAddr, remoteAddr string) bool + type ChordInfo struct + FingerTable map[int][]*ChordRemoteNodeInfo + LocalNode *LocalNode + Predecessors []*ChordRemoteNodeInfo + Successors []*ChordRemoteNodeInfo + type ChordRemoteNodeInfo struct + func (crn *ChordRemoteNodeInfo) MarshalJSON() ([]byte, error) + type LocalNode struct + func NewLocalNode(wallet *vault.Wallet, nn *nnet.NNet) (*LocalNode, error) + func (handlerStore LocalNode) AddMessageHandler(messageType pb.MessageType, handler MessageHandler) + func (handlerStore LocalNode) GetMessageHandlers(messageType pb.MessageType) []MessageHandler + func (hc LocalNode) ExistHash(hash common.Uint256) bool + func (localNode *LocalNode) BroadcastTransaction(txn *transaction.Transaction) error + func (localNode *LocalNode) CheckIDChange(v interface{}) + func (localNode *LocalNode) FindSuccessorAddrs(key []byte, numSucc int) ([]string, error) + func (localNode *LocalNode) FindWsAddr(key []byte) (string, string, []byte, []byte, error) + func (localNode *LocalNode) FindWssAddr(key []byte) (string, string, []byte, []byte, error) + func (localNode *LocalNode) GetChordInfo() *ChordInfo + func (localNode *LocalNode) GetGossipNeighbors(filter func(*RemoteNode) bool) []*RemoteNode + func (localNode *LocalNode) GetHeight() uint32 + func (localNode *LocalNode) GetNeighborInfo() []*RemoteNode + func (localNode *LocalNode) GetNeighborsMajorityStateRootByHeight(height uint32, neighbors []*RemoteNode) common.Uint256 + func (localNode *LocalNode) GetProposalSubmitted() uint32 + func (localNode *LocalNode) GetRelayMessageCount() uint64 + func (localNode *LocalNode) GetSyncState() pb.SyncState + func (localNode *LocalNode) GetTxnPool() *pool.TxnPool + func (localNode *LocalNode) GetVotingNeighbors(filter func(*RemoteNode) bool) []*RemoteNode + func (localNode *LocalNode) GetWsAddr() string + func (localNode *LocalNode) GetWssAddr() string + func (localNode *LocalNode) IncrementProposalSubmitted() + func (localNode *LocalNode) IncrementRelayMessageCount() + func (localNode *LocalNode) MarshalJSON() ([]byte, error) + func (localNode *LocalNode) NewSignatureChainObjectionMessage(height uint32, sigHash []byte) (*pb.UnsignedMessage, error) + func (localNode *LocalNode) ResetSyncing() + func (localNode *LocalNode) SendRelayMessage(srcAddr, destAddr string, payload, signature, blockHash []byte, ...) error + func (localNode *LocalNode) SerializeMessage(unsignedMsg *pb.UnsignedMessage, sign bool) ([]byte, error) + func (localNode *LocalNode) SetMinVerifiableHeight(height uint32) + func (localNode *LocalNode) SetSyncState(s pb.SyncState) bool + func (localNode *LocalNode) Start() error + func (localNode *LocalNode) StartFastSyncing(syncRootHash common.Uint256, peers []*RemoteNode) error + func (localNode *LocalNode) StartSyncing(syncStopHash common.Uint256, syncStopHeight uint32, neighbors []*RemoteNode) (bool, error) + func (localNode *LocalNode) VerifySigChain(sc *pb.SigChain, height uint32) error + func (localNode *LocalNode) VerifySigChainObjection(sc *pb.SigChain, reporterID []byte, height uint32) (int, error) + func (nm LocalNode) GetConnectionCnt() uint + func (nm LocalNode) GetNeighborHeights() ([]uint32, uint) + func (nm LocalNode) GetNeighborNode(id string) *RemoteNode + func (nm LocalNode) GetNeighbors(filter func(*RemoteNode) bool) []*RemoteNode + type MessageHandler func(msg *RemoteMessage) (reply []byte, shouldCallNext bool, err error) + type Node struct + func NewNode(nnetNode *nnetpb.Node, nodeData *pb.NodeData) (*Node, error) + func (n *Node) GetChordID() []byte + func (n *Node) GetHostname() string + func (n *Node) GetID() string + func (n *Node) GetMinVerifiableHeight() uint32 + func (n *Node) GetPubKey() []byte + func (n *Node) GetSyncState() pb.SyncState + func (n *Node) MarshalJSON() ([]byte, error) + func (n *Node) SetMinVerifiableHeight(height uint32) + func (n *Node) SetSyncState(s pb.SyncState) bool + type RelayService struct + func NewRelayService(wallet *vault.Wallet, localNode *LocalNode) *RelayService + func (rs *RelayService) Start() error + type RemoteMessage struct + Message []byte + Sender *Node + type RemoteNode struct + func NewRemoteNode(localNode *LocalNode, nnetNode *nnetnode.RemoteNode) (*RemoteNode, error) + func (remoteNode *RemoteNode) CloseConn() + func (remoteNode *RemoteNode) GetBlockHeaders(startHeight, endHeight uint32) ([]*block.Header, error) + func (remoteNode *RemoteNode) GetBlocks(startHeight, endHeight uint32) ([]*block.Block, error) + func (remoteNode *RemoteNode) GetHeight() uint32 + func (remoteNode *RemoteNode) GetLastUpdateTime() time.Time + func (remoteNode *RemoteNode) GetStates(hashes []common.Uint256) ([][]byte, error) + func (remoteNode *RemoteNode) IsStopped() bool + func (remoteNode *RemoteNode) MarshalJSON() ([]byte, error) + func (remoteNode *RemoteNode) SendBytesAsync(buf []byte) error + func (remoteNode *RemoteNode) SendBytesReply(replyToID, buf []byte) error + func (remoteNode *RemoteNode) SendBytesSync(buf []byte) ([]byte, error) + func (remoteNode *RemoteNode) SendBytesSyncWithTimeout(buf []byte, replyTimeout time.Duration) ([]byte, error) + func (remoteNode *RemoteNode) SetHeight(height uint32) + func (remoteNode *RemoteNode) SetLastUpdateTime(lastUpdateTime time.Time) + func (remoteNode *RemoteNode) String() string + type TlsDomain struct + DashedIP string + func (w *TlsDomain) IpToDomain(domainTemplate string) (string, error)