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

Function SetPublicKey

crypto/kms/pubkeystore.go:247–255  ·  view source on GitHub ↗

SetPublicKey verifies nonce and set Public Key.

(id proto.NodeID, nonce mine.Uint256, publicKey *asymmetric.PublicKey)

Source from the content-addressed store, hash-verified

245
246// SetPublicKey verifies nonce and set Public Key.
247func SetPublicKey(id proto.NodeID, nonce mine.Uint256, publicKey *asymmetric.PublicKey) (err error) {
248 nodeInfo := &proto.Node{
249 ID: id,
250 Addr: "",
251 PublicKey: publicKey,
252 Nonce: nonce,
253 }
254 return SetNode(nodeInfo)
255}
256
257// SetNode verifies nonce and sets {proto.Node.ID: proto.Node}.
258func SetNode(nodeInfo *proto.Node) (err error) {

Callers 6

TestETLSBugFunction · 0.92
TestEncPingFindNeighborFunction · 0.92
TestDBFunction · 0.85

Calls 1

SetNodeFunction · 0.85

Tested by 6

TestETLSBugFunction · 0.74
TestEncPingFindNeighborFunction · 0.74
TestDBFunction · 0.68