MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / IsEmpty

Method IsEmpty

proto/nodeinfo.go:153–155  ·  view source on GitHub ↗

IsEmpty test if a nodeID is empty.

()

Source from the content-addressed store, hash-verified

151
152// IsEmpty test if a nodeID is empty.
153func (id *NodeID) IsEmpty() bool {
154 return id == nil || "" == string(*id) || id.ToRawNodeID().IsEqual(&hash.Hash{})
155}
156
157// IsEqual returns if two node id is equal.
158func (id *NodeID) IsEqual(target *NodeID) bool {

Callers 4

TestNodeID_IsEmptyFunction · 0.95
VerifyAsGenesisMethod · 0.80
UploadMetricsMethod · 0.80
GetCurrentBPFunction · 0.80

Calls 2

ToRawNodeIDMethod · 0.95
IsEqualMethod · 0.45

Tested by 1

TestNodeID_IsEmptyFunction · 0.76