From fac451ec0fba47d992bdc29c58588fbd8ab06f98 Mon Sep 17 00:00:00 2001 From: postmannen Date: Tue, 31 May 2022 09:44:01 +0200 Subject: [PATCH] updated yaml package, and removed debug info --- go.mod | 2 +- go.sum | 2 ++ requests_keys.go | 11 +---------- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index a9b5750..df40169 100644 --- a/go.mod +++ b/go.mod @@ -16,7 +16,7 @@ require ( github.com/prometheus/client_golang v1.11.0 github.com/rivo/tview v0.0.0-20220106183741-90d72bc664f5 go.etcd.io/bbolt v1.3.5 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b + gopkg.in/yaml.v3 v3.0.1 ) require ( diff --git a/go.sum b/go.sum index dc4d63d..93f41b3 100644 --- a/go.sum +++ b/go.sum @@ -245,3 +245,5 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/requests_keys.go b/requests_keys.go index fffbe59..a2f64f4 100644 --- a/requests_keys.go +++ b/requests_keys.go @@ -340,7 +340,6 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string) }() - // HERE: // If new keys were allowed into the main map, we should send out one // single update to all the registered nodes to inform of an update. // NB: If a node is not reachable at the time the update is sent it is @@ -366,22 +365,15 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string) return nil }() - fmt.Printf("\n DEBUG DEBUG DEBUG 1 \n\n") - if err != nil { return err } - fmt.Printf("\n DEBUG DEBUG DEBUG 2 \n\n") - // proc.centralAuth.pki.nodeNotAckedPublicKeys.mu.Lock() // defer proc.centralAuth.pki.nodeNotAckedPublicKeys.mu.Unlock() - fmt.Printf("\n DEBUG DEBUG DEBUG 3: %v \n\n", proc.centralAuth.pki.nodeNotAckedPublicKeys.KeyMap) - // For all nodes that is not ack'ed we try to send an update once. for n := range proc.centralAuth.pki.nodeNotAckedPublicKeys.KeyMap { - fmt.Printf("\n DEBUG DEBUG DEBUG 4: ranging map, working on node %v \n\n", n) msg := Message{ ToNode: n, Method: REQKeysDeliverUpdate, @@ -402,7 +394,6 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string) // For all nodes that is ack'ed we try to send an update once. for n := range proc.centralAuth.pki.nodesAcked.keysAndHash.Keys { - fmt.Printf("\n DEBUG DEBUG DEBUG 5: ranging map, working on node %v \n\n", n) msg := Message{ ToNode: n, Method: REQKeysDeliverUpdate, @@ -418,7 +409,7 @@ func (m methodREQKeysAllow) handler(proc process, message Message, node string) proc.toRingbufferCh <- []subjectAndMessage{sam} - fmt.Printf("\n ----> methodREQKeysAllow: SENDING KEYS TO NODE=%v\n", message.FromNode) + log.Printf("\n ----> methodREQKeysAllow: sending keys update to node=%v\n", message.FromNode) } return nil