0xdcarns 3 years ago
parent
commit
b8a1522845
2 changed files with 4 additions and 0 deletions
  1. 2 0
      controllers/node_grpc.go
  2. 2 0
      logic/traffic.go

+ 2 - 0
controllers/node_grpc.go

@@ -83,6 +83,8 @@ func (s *NodeServiceServer) CreateNode(ctx context.Context, req *nodepb.Object)
 		return nil, keyErr
 	}
 
+	fmt.Printf("appending key to node: %v \n", key)
+
 	node.TrafficKeys = models.TrafficKeys{
 		Mine:   node.TrafficKeys.Mine,
 		Server: key.PublicKey,

+ 2 - 0
logic/traffic.go

@@ -2,6 +2,7 @@ package logic
 
 import (
 	"crypto/rsa"
+	"fmt"
 )
 
 // RetrieveTrafficKey - retrieves key based on node
@@ -10,5 +11,6 @@ func RetrieveTrafficKey() (rsa.PrivateKey, error) {
 	if err != nil {
 		return rsa.PrivateKey{}, err
 	}
+	fmt.Printf("retrieved key: %v \n", telRecord.TrafficKey)
 	return telRecord.TrafficKey, nil
 }