Commit 6fca41f4 authored by Adin Schmahmann's avatar Adin Schmahmann

comments: added comments clarifying the contract of getLocal

parent 9ebf3068
......@@ -536,7 +536,10 @@ func (dht *IpfsDHT) persistRTPeersInPeerStore() {
}
}
// getLocal attempts to retrieve the value from the datastore
// getLocal attempts to retrieve the value from the datastore.
//
// returns nil, nil when either nothing is found or the value found doesn't properly validate.
// returns nil, some_error when there's a *datastore* error (i.e., something goes very wrong)
func (dht *IpfsDHT) getLocal(key string) (*recpb.Record, error) {
logger.Debugw("finding value in datastore", "key", internal.LoggableRecordKeyString(key))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment