1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2025-03-31 01:24:31 +00:00

removed comments

This commit is contained in:
postmannen 2025-01-09 06:46:06 +01:00
parent 2d14ce3303
commit 1303be2e9e
2 changed files with 2 additions and 8 deletions

View file

@ -134,14 +134,6 @@ func (c *centralAuth) addPublicKey(proc process, msg Message) {
notAckedNodes := []Node{}
c.pki.nodeNotAckedPublicKeys.mu.Lock()
// existingNotAckedKey, ok := c.pki.nodeNotAckedPublicKeys.KeyMap[msg.FromNode]
// // We only want to send one notification to the error kernel about new key detection,
// // so we check if the values are the same as the one we already got before we continue
// // with registering and logging for the the new key.
// if ok && bytes.Equal(existingNotAckedKey, msg.Data) {
// c.pki.nodeNotAckedPublicKeys.mu.Unlock()
// return
// }
c.pki.nodeNotAckedPublicKeys.KeyMap[msg.FromNode] = msg.Data

View file

@ -63,6 +63,8 @@ func methodHello(proc process, message Message, node string) ([]byte, error) {
// received, the handler will deliver the message to the procFunc on the
// proc.procFuncCh, and we can then read that message from the procFuncCh in
// the procFunc running.
// The public key of a node are sent in the data field of the hello message,
// so we also handle the logic with registering keys from here.
func procFuncHelloSubscriber(ctx context.Context, proc process, procFuncCh chan Message) error {
// sayHelloNodes := make(map[Node]struct{})