Skip to content

Commit

Permalink
replace hex with base64 for definition_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
dB2510 committed Jun 30, 2022
1 parent 3836392 commit 975dd2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dkg/dkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package dkg
import (
"context"
crand "crypto/rand"
"encoding/base64"
"fmt"
"time"

Expand Down Expand Up @@ -98,7 +99,7 @@ func Run(ctx context.Context, conf Config) (err error) {
if err != nil {
return errors.Wrap(err, "hash definition")
}
clusterID := fmt.Sprintf("%x", defHash[:])
clusterID := base64.StdEncoding.EncodeToString(defHash[:])

peerIds, err := def.PeerIDs()
if err != nil {
Expand Down Expand Up @@ -133,7 +134,7 @@ func Run(ctx context.Context, conf Config) (err error) {

tp := newFrostP2P(ctx, tcpNode, peerMap, clusterID)

log.Info(ctx, "Connecting to peers...", z.Hex("definition_hash", defHash[:]))
log.Info(ctx, "Connecting to peers...", z.Str("definition_hash", clusterID))

ctx, cancel, err = waitPeers(ctx, tcpNode, peers)
if err != nil {
Expand Down

0 comments on commit 975dd2b

Please sign in to comment.