MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / GetLocalNodeID

Function GetLocalNodeID

crypto/kms/localkeystore.go:103–115  ·  view source on GitHub ↗

GetLocalNodeID gets current node ID in hash string format.

()

Source from the content-addressed store, hash-verified

101
102// GetLocalNodeID gets current node ID in hash string format.
103func GetLocalNodeID() (rawNodeID proto.NodeID, err error) {
104 var rawNodeIDBytes []byte
105 if rawNodeIDBytes, err = GetLocalNodeIDBytes(); err != nil {
106 return
107 }
108 var h *hash.Hash
109 if h, err = hash.NewHash(rawNodeIDBytes); err != nil {
110 return
111 }
112 rawNodeID = proto.NodeID(h.String())
113
114 return
115}
116
117// GetLocalNodeIDBytes get current node ID copy in []byte.
118func GetLocalNodeIDBytes() (rawNodeID []byte, err error) {

Callers 15

newConnFunction · 0.92
registerNodeFunction · 0.92
QuerySQLChainProfileMethod · 0.92
testRequestFunction · 0.92
genPeersFunction · 0.92
buildRequestFunction · 0.92
buildResponseFunction · 0.92
registerNodeFunction · 0.92
buildRequestFunction · 0.92
NewDatabaseFunction · 0.92
buildAckFunction · 0.92
buildQueryExFunction · 0.92

Calls 4

StringMethod · 0.95
NewHashFunction · 0.92
NodeIDTypeAlias · 0.92
GetLocalNodeIDBytesFunction · 0.85

Tested by 12

QuerySQLChainProfileMethod · 0.74
testRequestFunction · 0.74
genPeersFunction · 0.74
buildRequestFunction · 0.74
buildResponseFunction · 0.74
buildRequestFunction · 0.74
buildAckFunction · 0.74
buildQueryExFunction · 0.74
getPeersFunction · 0.74
TestDBMSFunction · 0.74
testRequestFunction · 0.74
TestLocalKeyStoreFunction · 0.68